diff --git a/tests/codeception/common/_support/amqp/Helper.php b/tests/codeception/common/_support/amqp/Helper.php index bea9e03..7c6cd1b 100644 --- a/tests/codeception/common/_support/amqp/Helper.php +++ b/tests/codeception/common/_support/amqp/Helper.php @@ -4,21 +4,9 @@ namespace tests\codeception\common\_support\amqp; use Codeception\Exception\ModuleException; use Codeception\Module; use Codeception\Module\Yii2; -use Codeception\TestInterface; class Helper extends Module { - public function _before(TestInterface $test) { - /** @var \Codeception\Lib\Connector\Yii2 $connector */ - $connector = $this->getYii2()->client; - $app = $connector->getApplication(); - $app->set('amqp', [ - 'class' => TestComponent::class, - ]); - - parent::_before($test); - } - /** * Checks that message is created. * diff --git a/tests/codeception/config/config.php b/tests/codeception/config/config.php index 2904804..dedd16f 100644 --- a/tests/codeception/config/config.php +++ b/tests/codeception/config/config.php @@ -17,5 +17,8 @@ return [ // Для тестов нам не сильно важна безопасность, а вот время прохождения тестов значительно сокращается 'passwordHashCost' => 4, ], + 'amqp' => [ + 'class' => tests\codeception\common\_support\amqp\TestComponent::class, + ], ], ];