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

Function TestPrinterPrintScalarString

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

Source from the content-addressed store, hash-verified

367}
368
369func TestPrinterPrintScalarString(t *testing.T) {
370 o := bytes.NewBufferString("")
371
372 p := printer.NewPrinter(o)
373 p.Print(&scalar.String{
374 Value: "'hello world'",
375 })
376
377 expected := `'hello world'`
378 actual := o.String()
379
380 if expected != actual {
381 t.Errorf("\nexpected: %s\ngot: %s\n", expected, actual)
382 }
383}
384
385func TestPrinterPrintScalarEncapsedStringPart(t *testing.T) {
386 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…