Ejemplo n.º 1
0
 /**
  * @testdox write() accepts content type elements
  */
 public function WriteAcceptsContentTypeElements(UnitTester $I)
 {
     $renderer = new Renderer(['token' => '*/*'], new Container());
     $content = new ContentType('This is the content.');
     $more = new ContentType('More of this.');
     $content->accept($renderer);
     $renderer->write($more);
     $I->assertEquals("standard: This is the content.\nstandard: More of this.\n", (string) $renderer);
 }
Ejemplo n.º 2
0
 public function visitContent(ContentType $content)
 {
     $str = "standard: " . $content->getContents() . "\n";
     $this->output .= $str;
     return strlen($str);
 }