Codeception / AspectMock

The most powerful and flexible mocking framework for PHPUnit / Codeception.
MIT License
790 stars 129 forks source link

cacheDir cannot be omitted #181

Open alekseykuleshov opened 4 years ago

alekseykuleshov commented 4 years ago

It's stated in documentation that cacheDir setting can be skipped: https://github.com/Codeception/AspectMock/blob/master/README.md


Although when I don't specify it, I getting the error running the tests:

Fatal error: Uncaught RuntimeException: You need to provide valid cache directory for Go! AOP framework.

What do I do wrong? Or if it's really required and cannot be omitted, the documentation should be updated.

foxbit19 commented 4 years ago

Same problem here.

I've added the folder aopcache to my project and set the init as follow:

$kernel->init([
    'debug' => true,
    'includePaths' => [__DIR__ . '/../application'],
    'cacheDir'     => __DIR__ . '/../aopcache', // Cache directory
]);

I agree with @alekseykuleshov. I think the documentation should be updated.