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

Function TestBooleanAnd

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

Source from the content-addressed store, hash-verified

240}
241
242func TestBooleanAnd(t *testing.T) {
243 src := `<? $a && $b;`
244
245 expected := &node.Root{
246 Position: &position.Position{
247 StartLine: 1,
248 EndLine: 1,
249 StartPos: 3,
250 EndPos: 12,
251 },
252 Stmts: []node.Node{
253 &stmt.Expression{
254 Position: &position.Position{
255 StartLine: 1,
256 EndLine: 1,
257 StartPos: 3,
258 EndPos: 12,
259 },
260 Expr: &binary.BooleanAnd{
261 Position: &position.Position{
262 StartLine: 1,
263 EndLine: 1,
264 StartPos: 3,
265 EndPos: 11,
266 },
267 Left: &expr.Variable{
268 Position: &position.Position{
269 StartLine: 1,
270 EndLine: 1,
271 StartPos: 3,
272 EndPos: 5,
273 },
274 VarName: &node.Identifier{
275 Position: &position.Position{
276 StartLine: 1,
277 EndLine: 1,
278 StartPos: 3,
279 EndPos: 5,
280 },
281 Value: "a",
282 },
283 },
284 Right: &expr.Variable{
285 Position: &position.Position{
286 StartLine: 1,
287 EndLine: 1,
288 StartPos: 9,
289 EndPos: 11,
290 },
291 VarName: &node.Identifier{
292 Position: &position.Position{
293 StartLine: 1,
294 EndLine: 1,
295 StartPos: 9,
296 EndPos: 11,
297 },
298 Value: "b",
299 },

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…