mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Test environment consistency fixes
git-clean in E107Base now runs first in _beforeSuite() so that tainted files are not uploaded in Acceptance tests E107Base::revokeLocalE107Config() now checks for file existence before unlinking. XXX: Could remove this method if cleanVCS() proves reliable Acceptance won't try to write an e107_config.php because the tests themselves populate the configuration file
This commit is contained in:
@@ -7,4 +7,10 @@ namespace Helper;
|
|||||||
class Acceptance extends E107Base
|
class Acceptance extends E107Base
|
||||||
{
|
{
|
||||||
protected $deployer_components = ['db', 'fs'];
|
protected $deployer_components = ['db', 'fs'];
|
||||||
|
|
||||||
|
protected function writeLocalE107Config()
|
||||||
|
{
|
||||||
|
// Noop
|
||||||
|
// Acceptance tests will install the app themselves
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,8 +11,8 @@ abstract class E107Base extends Base
|
|||||||
|
|
||||||
public function _beforeSuite($settings = array())
|
public function _beforeSuite($settings = array())
|
||||||
{
|
{
|
||||||
parent::_beforeSuite($settings);
|
|
||||||
$this->cleanVCS();
|
$this->cleanVCS();
|
||||||
|
parent::_beforeSuite($settings);
|
||||||
$this->writeLocalE107Config();
|
$this->writeLocalE107Config();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,6 +45,7 @@ abstract class E107Base extends Base
|
|||||||
|
|
||||||
protected function revokeLocalE107Config()
|
protected function revokeLocalE107Config()
|
||||||
{
|
{
|
||||||
|
if (file_exists(self::APP_PATH_E107_CONFIG))
|
||||||
unlink(self::APP_PATH_E107_CONFIG);
|
unlink(self::APP_PATH_E107_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user