Exemple #1
0
 /**
  * @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'));
 }
Exemple #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;
 }
Exemple #4
0
 /**
  * Simple Router Test
  */
 public function testRouter()
 {
     $this->router = $this->application->get('Router');
     $this->assertInstanceOf('\\Core\\Router\\Router', $this->router);
 }