示例#1
0
 /**
  * Sets up the application before every test.
  * 
  * If you're overwriting this then be sure to call parent::setUp().
  */
 public function setUp()
 {
     if (!class_exists(static::$applicationClass)) {
         throw new \RuntimeException('Application class "' . static::$applicationClass . '" does not exist. Has it been properly loaded?');
     }
     $appClass = static::$applicationClass;
     $this->application = new $appClass();
     Framework::run($this->application, 'test', true, Framework::MODE_TEST);
 }
示例#2
0
<?php

require_once __DIR__ . '/../vendor/autoload.php';
use Splot\Framework\Framework;
use Application\App;
// detect env based on .tld
$tld = end(explode('.', $_SERVER['SERVER_NAME']));
$env = $tld === 'dev' ? 'dev' : 'prod';
$debug = $env === 'dev' ? true : false;
Framework::run(new App(), $env, $debug);
示例#3
0
 /**
  * Sets up the application before every test.
  * 
  * If you're overwriting this then be sure to call parent::setUp().
  */
 public function setUp()
 {
     $this->application = new TestApplication();
     Framework::run($this->application, 'test', true, Framework::MODE_TEST);
 }
示例#4
0
<?php

use Splot\Framework\Framework;
$rootDir = __DIR__ . '/..';
require_once $rootDir . '/vendor/autoload.php';
require_once $rootDir . '/app/Application.php';
Framework::run(new Application());