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

Function TestPrinterPrintBinaryBooleanAnd

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

Source from the content-addressed store, hash-verified

862}
863
864func TestPrinterPrintBinaryBooleanAnd(t *testing.T) {
865 o := bytes.NewBufferString("")
866
867 p := printer.NewPrinter(o)
868 p.Print(&binary.BooleanAnd{
869 Left: &expr.Variable{
870 VarName: &node.Identifier{Value: "a"},
871 },
872 Right: &expr.Variable{
873 VarName: &node.Identifier{Value: "b"},
874 },
875 })
876
877 expected := `$a&&$b`
878 actual := o.String()
879
880 if expected != actual {
881 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
882 }
883}
884
885func TestPrinterPrintBinaryBooleanOr(t *testing.T) {
886 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…