1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 20:30:39 +02:00

_beforeSuite() of modules called in \Helper\Base

f080402675 only works when a Deployer is
active, but local developers would not be using a Deployer.

For some reason (still unknown), the Codeception framework doesn't
execute _beforeSuite() for all the active modules, so \Helper\Base has
been coded to pick up the slack.

Actually fixes: #1
This commit is contained in:
Deltik
2018-02-15 05:35:47 -06:00
parent 11817896b4
commit a18ca98f9a

View File

@@ -17,6 +17,11 @@ abstract class Base extends \Codeception\Module
$this->deployer->start($this->deployer_components);
$this->_callbackDeployerStarted();
}
foreach ($this->getModules() as $module)
{
if (get_class($module) !== get_class($this))
$module->_beforeSuite();
}
}
public function _afterSuite()
@@ -39,7 +44,6 @@ abstract class Base extends \Codeception\Module
$url = $this->deployer->getUrl();
$browser = $this->getModule('PhpBrowser');
$browser->_reconfigure(array('url' => $url));
$browser->_beforeSuite();
}
protected function _reconfigure_db()
@@ -52,6 +56,5 @@ 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();
}
}