MCPcopy Create free account
hub / github.com/z7zmey/php-parser / TestLogicalAnd

Function TestLogicalAnd

node/expr/binary/t_binary_op_test.go:912–985  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

910}
911
912func TestLogicalAnd(t *testing.T) {
913 src := `<? $a and $b;`
914
915 expected := &node.Root{
916 Position: &position.Position{
917 StartLine: 1,
918 EndLine: 1,
919 StartPos: 3,
920 EndPos: 13,
921 },
922 Stmts: []node.Node{
923 &stmt.Expression{
924 Position: &position.Position{
925 StartLine: 1,
926 EndLine: 1,
927 StartPos: 3,
928 EndPos: 13,
929 },
930 Expr: &binary.LogicalAnd{
931 Position: &position.Position{
932 StartLine: 1,
933 EndLine: 1,
934 StartPos: 3,
935 EndPos: 12,
936 },
937 Left: &expr.Variable{
938 Position: &position.Position{
939 StartLine: 1,
940 EndLine: 1,
941 StartPos: 3,
942 EndPos: 5,
943 },
944 VarName: &node.Identifier{
945 Position: &position.Position{
946 StartLine: 1,
947 EndLine: 1,
948 StartPos: 3,
949 EndPos: 5,
950 },
951 Value: "a",
952 },
953 },
954 Right: &expr.Variable{
955 Position: &position.Position{
956 StartLine: 1,
957 EndLine: 1,
958 StartPos: 10,
959 EndPos: 12,
960 },
961 VarName: &node.Identifier{
962 Position: &position.Position{
963 StartLine: 1,
964 EndLine: 1,
965 StartPos: 10,
966 EndPos: 12,
967 },
968 Value: "b",
969 },

Callers

nothing calls this directly

Calls 4

ParseMethod · 0.95
GetRootNodeMethod · 0.95
NewParserFunction · 0.92
NewParserFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…