Exemplo n.º 1
0
 public function testViewCreateMethod()
 {
     $app = new \Cygnite\Foundation\Application();
     ViewFactory::setApplication($app);
     $data = ['foo' => 'Cygnite!'];
     $content = View::create('fixtures.hello', $data);
     $this->assertEquals('Hello Cygnite!', Response::make($content)->getContent());
     $data = ['foo' => 'Foo Bar!'];
     $composeContent = View::compose('fixtures.hello', $data);
     $this->assertEquals('Hello Foo Bar!', Response::make($composeContent)->getContent());
 }
Exemplo n.º 2
0
 /**
  * @return mixed
  */
 public function view()
 {
     ViewFactory::setApplication(Application::instance());
     return ViewFactory::make();
 }