示例#1
0
 protected function setupDatabase($name)
 {
     $config = $this->getConfig();
     $config['app']['context'] = "{$name}_test";
     \ntentan\Ntentan::setup($config['ntentan'], $config['app']);
     \ntentan\Ntentan::$modulesPath = TEST_HOME . "/app";
     $this->datastoreName = $name;
 }
示例#2
0
 /**
  * A utility function which calls both the Ntentan::setup() and Ntentan::route()
  * methods at once. 
  * 
  * @see Ntentan::setup()
  * @see Ntentan::route()
  * @param array $config
  */
 public static function boot($config)
 {
     Ntentan::setup($config);
     if (!defined('STDOUT')) {
         Ntentan::route();
     }
 }