From f080402675b6aebe4a73bba3ed1a82461d737239 Mon Sep 17 00:00:00 2001 From: Deltik Date: Wed, 14 Feb 2018 13:43:24 -0600 Subject: [PATCH] Reconfigured modules now run _beforeSuite() Platform-independent SQL dump importing works now because Helper\DelayedDb is now running _beforeSuite() after being reconfigured. Fixes: #1 --- codeception.yml | 1 - tests/_support/Helper/Base.php | 5 ++++- tests/unit.suite.yml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/codeception.yml b/codeception.yml index d03266adc..212f4e2f4 100644 --- a/codeception.yml +++ b/codeception.yml @@ -25,7 +25,6 @@ modules: password: '' populate: true dump: 'tests/_data/e107_v2.1.8.sample.sql' - populator: 'mysql -u $user -h $host -p''$password'' $dbname < $dump' - \Helper\DeployerFactory: secrets: cpanel: diff --git a/tests/_support/Helper/Base.php b/tests/_support/Helper/Base.php index ff3f0f335..67693934a 100644 --- a/tests/_support/Helper/Base.php +++ b/tests/_support/Helper/Base.php @@ -37,7 +37,9 @@ abstract class Base extends \Codeception\Module protected function _reconfigure_fs() { $url = $this->deployer->getUrl(); - $this->getModule('PhpBrowser')->_reconfigure(array('url' => $url)); + $browser = $this->getModule('PhpBrowser'); + $browser->_reconfigure(array('url' => $url)); + $browser->_beforeSuite(); } protected function _reconfigure_db() @@ -50,5 +52,6 @@ abstract class Base extends \Codeception\Module $db->_reconfigure($Db_config); // Next line is used to make connection available to any code after this point //$this->getModule('\Helper\DelayedDb')->_delayedInitialize(); + $db->_beforeSuite(); } } diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml index 026c91db9..e09b078a9 100644 --- a/tests/unit.suite.yml +++ b/tests/unit.suite.yml @@ -6,4 +6,4 @@ actor: UnitTester modules: enabled: - Asserts - - \Helper\Unit \ No newline at end of file + - \Helper\Unit