/** * @covers Starlit\App\Provider\ErrorServiceProvider::register * @covers Starlit\App\Provider\StandardServiceProvider::register * @covers Starlit\App\BaseApp::getSession */ public function testInit() { $this->assertInstanceOf('\\Symfony\\Component\\HttpFoundation\\Session\\Session', $this->app->getSession()); $this->assertInstanceOf('\\Starlit\\App\\Router', $this->app->getRouter()); $this->assertInstanceOf('\\Starlit\\App\\View', $this->app->getView()); $this->assertEquals($this->fakeConfig['testkey'], $this->app->getConfig()->get('testkey')); $this->assertEquals($this->fakeConfig['phpSettings']['max_execution_time'], ini_get('max_execution_time')); $this->assertEquals($this->fakeConfig['phpSettings']['date']['timezone'], ini_get('date.timezone')); // test setup default routes $this->assertInstanceOf('Symfony\\Component\\Routing\\Route', $this->app->getRouter()->getRoutes()->get('/')); $this->assertInstanceOf('Symfony\\Component\\Routing\\Route', $this->app->getRouter()->getRoutes()->get('/{action}')); $this->assertInstanceOf('Symfony\\Component\\Routing\\Route', $this->app->getRouter()->getRoutes()->get('/{controller}/{action}')); }