Exemple #1
0
 /**
  * @covers ::addView()
  * @covers ::body()
  * @covers ::template()
  * @covers ::clear()
  * @covers \Arvici\Component\View\Render
  */
 public function testInvalidBody()
 {
     $this->clearBuilder();
     $this->builder->defaultStack();
     try {
         Render::getInstance()->body(new View('invalid', View::PART_TEMPLATE));
         $this->assertTrue(false);
     } catch (RendererException $re) {
         $this->assertTrue(true);
     }
     $this->builder->clear();
     try {
         Render::getInstance()->body(new View('valid_but_no_body_placeholder', View::PART_BODY));
         $this->assertTrue(false);
     } catch (RendererException $re) {
         $this->assertTrue(true);
     }
 }
Exemple #2
0
 public function __construct()
 {
     $this->render = Render::getInstance();
 }