/** * Create respective class instances for controller usage. * Mapped and re-assign to the core instances. */ protected function factory() { $this->request = $this->app->request(); $this->response = $this->app->response(); $this->route = $this->app->route(); $this->view = $this->app->view(); return $this; }
public function testSingletonViewClassInstanceViaStaticMethod() { $this->assertEquals($this->app->view(), App::view()); }