示例#1
0
 /**
  * @return object
  * @throws \ErrorException
  */
 public static function kernel()
 {
     return Application::get(static::getName());
 }
示例#2
0
 /**
  * @covers \Core\Application\BaseApplication::registerApp
  */
 public function testIfAppIsRegistered()
 {
     $this->assertInstanceOf('\\Core\\Application\\Application', Application::$app);
     $this->assertInstanceOf('\\Core\\Application\\Application', Application::get('App'));
 }
示例#3
0
 /**
  * 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;
 }
示例#4
0
 /**
  * Simple Router Test
  */
 public function testRouter()
 {
     $this->router = $this->application->get('Router');
     $this->assertInstanceOf('\\Core\\Router\\Router', $this->router);
 }