Skip to content

Instantly share code, notes, and snippets.

@wirwolf
Created September 2, 2016 16:27
Show Gist options
  • Save wirwolf/571d8c6638629af191f4235cdf4e3840 to your computer and use it in GitHub Desktop.
Save wirwolf/571d8c6638629af191f4235cdf4e3840 to your computer and use it in GitHub Desktop.
define('ROOT', dirname(dirname(__DIR__)) . '/');
require_once ROOT . 'vendor/autoload.php';
use Codeception\Configuration;
$kernel = AspectMock\Kernel::getInstance();
$kernel->init([
'debug' => true,
'appDir' => ROOT.'app',
'cacheDir' => ROOT . 'storage/runtime',
'excludePaths' => [ROOT.'vendor'],
]);
// Load additional files via kernel
$kernel->loadFile(ROOT . 'vendor/yiisoft/yii2/Yii.php');
$kernel->loadFile(ROOT . 'vendor/yiisoft/yii2/base/UnknownClassException.php');
$kernel->loadFile(ROOT . 'vendor/yiisoft/yii2/base/ErrorException.php');
//----------------------------------------------
//--------------------
Yii::setAlias('@config', ROOT . '/config/');
Yii::setAlias('@tests', dirname(__DIR__));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment