Example #1
0
 public function testDisableLayout()
 {
     $this->object->bootstrap("view", function () {
         $v = new View();
         $v->addViewPath(__DIR__ . '/views');
         return $v;
     });
     $this->object->bootstrap("layout", function () {
         $v = new Layout();
         $v->addViewPath(__DIR__ . '/layouts');
         $v->setScriptName("layout");
         return $v;
     });
     ob_start();
     $this->object->run(new Request("/general/disable-layout"));
     $content = ob_get_contents();
     ob_end_clean();
     $this->assertEquals("Only this view...", trim($content));
 }