Skip to content
Nate Sanden edited this page Jan 31, 2016 · 3 revisions

Laravel 4

<?php
$kernel = \AspectMock\Kernel::getInstance();
$kernel->init([
    'debug' => true,
    'cacheDir' => '/tmp/l4-sample',
    'includePaths' => [__DIR__.'/../vendor/laravel', __DIR__.'/../app']
]);

?>

Repo

Yii2

<?php
define('YII_ENV', 'test');

$kernel = AspectMock\Kernel::getInstance();
$kernel->init([
    'debug' => true,
    'includePaths' => [__DIR__.'/../common'],
]);
$kernel->loadFile(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
?>

Repo

Yii

<?php
$kernel->init([
    'debug' => false,
    'includePaths' => [
        __DIR__ . '/../'
    ],
    'appDir' => __DIR__ . '/../',
    'excludePaths' => [
        __DIR__ . '/../config',
        __DIR__ . '/../runtime',
        __DIR__ . '/../vendor/yiisoft/yii/framework/base/CComponent.php',
    ],
]);
?>

via @zvirusz

Clone this wiki locally