Example #1
0
 public function testViewCreateMethod()
 {
     $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());
 }
Example #2
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());
 }