Fix AspectMock to work when the Premium plugin is active [MAILPOET-1585]

This commit is contained in:
wxa
2018-10-11 23:08:40 +03:00
parent be75e0d3ee
commit b597cb39f1

View File

@@ -53,11 +53,15 @@ if(is_dir(getenv('WP_TEST_CACHE_PATH'))) {
$cacheDir = getenv('WP_TEST_CACHE_PATH');
}
$console->writeln('Clearing AspectMock cache...');
exec('rm -rf ' . $cacheDir . '/_transformation.cache');
$console->writeln('Initializing AspectMock library...');
$kernel = \AspectMock\Kernel::getInstance();
$kernel->init(
array(
'debug' => true,
'appDir' => __DIR__ . '/../',
'cacheDir' => $cacheDir,
'includePaths' => [__DIR__ . '/../lib']
)