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

Function TestConcat

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

Source from the content-addressed store, hash-verified

460}
461
462func TestConcat(t *testing.T) {
463 src := `<? $a . $b;`
464
465 expected := &node.Root{
466 Position: &position.Position{
467 StartLine: 1,
468 EndLine: 1,
469 StartPos: 3,
470 EndPos: 11,
471 },
472 Stmts: []node.Node{
473 &stmt.Expression{
474 Position: &position.Position{
475 StartLine: 1,
476 EndLine: 1,
477 StartPos: 3,
478 EndPos: 11,
479 },
480 Expr: &binary.Concat{
481 Position: &position.Position{
482 StartLine: 1,
483 EndLine: 1,
484 StartPos: 3,
485 EndPos: 10,
486 },
487 Left: &expr.Variable{
488 Position: &position.Position{
489 StartLine: 1,
490 EndLine: 1,
491 StartPos: 3,
492 EndPos: 5,
493 },
494 VarName: &node.Identifier{
495 Position: &position.Position{
496 StartLine: 1,
497 EndLine: 1,
498 StartPos: 3,
499 EndPos: 5,
500 },
501 Value: "a",
502 },
503 },
504 Right: &expr.Variable{
505 Position: &position.Position{
506 StartLine: 1,
507 EndLine: 1,
508 StartPos: 8,
509 EndPos: 10,
510 },
511 VarName: &node.Identifier{
512 Position: &position.Position{
513 StartLine: 1,
514 EndLine: 1,
515 StartPos: 8,
516 EndPos: 10,
517 },
518 Value: "b",
519 },

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…