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

Function TestPrinterPrintHaltCompiler

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

Source from the content-addressed store, hash-verified

3704}
3705
3706func TestPrinterPrintHaltCompiler(t *testing.T) {
3707 o := bytes.NewBufferString("")
3708
3709 p := printer.NewPrinter(o)
3710 p.Print(&stmt.HaltCompiler{})
3711
3712 expected := `__halt_compiler();`
3713 actual := o.String()
3714
3715 if expected != actual {
3716 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
3717 }
3718}
3719
3720func TestPrinterPrintIfExpression(t *testing.T) {
3721 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…