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

Function TestPrinterPrintInlineHtml

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

Source from the content-addressed store, hash-verified

3816}
3817
3818func TestPrinterPrintInlineHtml(t *testing.T) {
3819 o := bytes.NewBufferString("")
3820
3821 p := printer.NewPrinter(o)
3822 p.Print(&node.Root{
3823 Stmts: []node.Node{
3824 &stmt.InlineHtml{
3825 Value: "test",
3826 },
3827 },
3828 })
3829
3830 expected := `test`
3831 actual := o.String()
3832
3833 if expected != actual {
3834 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
3835 }
3836}
3837
3838func TestPrinterPrintInterface(t *testing.T) {
3839 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…