From c3fb2d7b34679e3a2e35f2bbb80ee22a4002fed2 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Wed, 7 Dec 2016 00:53:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BC=D0=BE=D0=BA=20=D1=81=D0=BE=D0=B5=D0=B4?= =?UTF-8?q?=D0=B8=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=81=20=D1=80=D1=8D?= =?UTF-8?q?=D0=B1=D0=B8=D1=82=D0=BE=D0=BC=20=D0=B4=D0=BB=D1=8F=20=D1=84?= =?UTF-8?q?=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=BE=D0=BD=D0=B0=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=82=D0=B5=D1=81=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/codeception/common/_support/amqp/Helper.php | 12 ------------ tests/codeception/config/config.php | 3 +++ 2 files changed, 3 insertions(+), 12 deletions(-) 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, + ], ], ];