/** * @return object * @throws \ErrorException */ public static function kernel() { return Application::get(static::getName()); }
/** * @covers \Core\Application\BaseApplication::registerApp */ public function testIfAppIsRegistered() { $this->assertInstanceOf('\\Core\\Application\\Application', Application::$app); $this->assertInstanceOf('\\Core\\Application\\Application', Application::get('App')); }
/** * Makes a View * * @param $template * @param array $parameters * @return View */ public static function make($template, array $parameters = []) { $instance = Application::get('View'); $instance->setTemplate($template); $engine = $instance->getEngine(); if (!empty($parameters)) { foreach ($parameters as $key => $val) { $engine->assign($key, $val); } } return $instance; }
/** * Simple Router Test */ public function testRouter() { $this->router = $this->application->get('Router'); $this->assertInstanceOf('\\Core\\Router\\Router', $this->router); }