AspectMock not working in Codeception framework
I want to mock the static methods, so I am using the AspectMock library https://github.com/Codeception/AspectMock. I tried to mock one static method but it doesnt return the expected mocked result. Configuration: tests/_bootstrap.php <?php define(‘YII_ENV’, ‘test’); defined(‘YII_DEBUG’) or define(‘YII_DEBUG’, true); require_once __DIR__ . ‘/../vendor/yiisoft/yii2/Yii.php’; require __DIR__ . ‘/../vendor/autoload.php’; $kernel = \AspectMock\Kernel::getInstance(); $kernel->init([ ‘debug’ => true, ‘includePaths’ … Read more