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

Function TestPrinterPrintScalarEncapsedStringPart

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

Source from the content-addressed store, hash-verified

383}
384
385func TestPrinterPrintScalarEncapsedStringPart(t *testing.T) {
386 o := bytes.NewBufferString("")
387
388 p := printer.NewPrinter(o)
389 p.Print(&scalar.EncapsedStringPart{
390 Value: "hello world",
391 })
392
393 expected := `hello world`
394 actual := o.String()
395
396 if expected != actual {
397 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
398 }
399}
400
401func TestPrinterPrintScalarEncapsed(t *testing.T) {
402 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…