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

Function TestPrinterPrintAssignShiftRight

printer/printer_test.go:778–797  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

776}
777
778func TestPrinterPrintAssignShiftRight(t *testing.T) {
779 o := bytes.NewBufferString("")
780
781 p := printer.NewPrinter(o)
782 p.Print(&assign.ShiftRight{
783 Variable: &expr.Variable{
784 VarName: &node.Identifier{Value: "a"},
785 },
786 Expression: &expr.Variable{
787 VarName: &node.Identifier{Value: "b"},
788 },
789 })
790
791 expected := `$a>>=$b`
792 actual := o.String()
793
794 if expected != actual {
795 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
796 }
797}
798
799// binary
800

Callers

nothing calls this directly

Calls 3

PrintMethod · 0.95
NewPrinterFunction · 0.92
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…