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

Function TestPrinterPrintRequireOnce

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

Source from the content-addressed store, hash-verified

2252}
2253
2254func TestPrinterPrintRequireOnce(t *testing.T) {
2255 o := bytes.NewBufferString("")
2256
2257 p := printer.NewPrinter(o)
2258 p.Print(&expr.RequireOnce{
2259 Expr: &scalar.String{Value: "'path'"},
2260 })
2261
2262 expected := `require_once 'path'`
2263 actual := o.String()
2264
2265 if expected != actual {
2266 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
2267 }
2268}
2269
2270func TestPrinterPrintShellExec(t *testing.T) {
2271 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…