Exemplo n.º 1
0
 public function testPrintingBody()
 {
     $this->object->setBody('Hello');
     $this->object->appendBody('World');
     $this->assertEquals('HelloWorld', $this->object->getBody());
     ob_start();
     print $this->object;
     $buffer = ob_get_contents();
     ob_end_clean();
     $this->assertEquals('HelloWorld', $buffer);
     ob_start();
     $this->object->printText();
     $buffer = ob_get_contents();
     ob_end_clean();
     $this->assertEquals('HelloWorld', $buffer);
 }