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

Function TestPrinterPrintAssignBitwiseOr

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

Source from the content-addressed store, hash-verified

545}
546
547func TestPrinterPrintAssignBitwiseOr(t *testing.T) {
548 o := bytes.NewBufferString("")
549
550 p := printer.NewPrinter(o)
551 p.Print(&assign.BitwiseOr{
552 Variable: &expr.Variable{
553 VarName: &node.Identifier{Value: "a"},
554 },
555 Expression: &expr.Variable{
556 VarName: &node.Identifier{Value: "b"},
557 },
558 })
559
560 expected := `$a|=$b`
561 actual := o.String()
562
563 if expected != actual {
564 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
565 }
566}
567
568func TestPrinterPrintAssignBitwiseXor(t *testing.T) {
569 o := bytes.NewBufferString("")

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…