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()); }
/** * @param $method * @param $params * @return mixed */ public static function __callStatic($method, $params) { return call_user_func_array([ViewFactory::make(), $method], [$params]); }
/** * @return mixed */ public function view() { ViewFactory::setApplication(Application::instance()); return ViewFactory::make(); }
/** * @return mixed */ public function view() { return ViewFactory::make(); }