Author: Anton Shevchuk
Inheritance: extends Bluz\Application\Application
Esempio n. 1
0
 /**
  * Get Application instance
  *
  * @return BootstrapTest
  */
 protected static function getApp()
 {
     if (!self::$app) {
         $env = getenv('BLUZ_ENV') ?: 'testing';
         self::$app = BootstrapTest::getInstance();
         self::$app->init($env);
     }
     return self::$app;
 }
Esempio n. 2
0
<?php

// Environment
define('DEBUG', true);
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
// Paths
define('PATH_ROOT', realpath(dirname(__FILE__) . '/../'));
define('PATH_APPLICATION', PATH_ROOT . '/tests');
define('PATH_VENDOR', PATH_ROOT . '/vendor');
// Emulate session
$_SESSION = [];
$_COOKIE[session_name()] = uniqid();
// init autoloader
require_once PATH_ROOT . '/vendor/autoload.php';
// init application
$env = getenv('BLUZ_ENV') ?: 'testing';
$app = \Bluz\Tests\BootstrapTest::getInstance();
$app->init($env);