1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-25 15:31:41 +02:00

Preparation for merge with e107 repository

Moved all test files to e107_tests subdirectory
This commit is contained in:
Deltik
2019-11-27 11:18:53 -06:00
parent a07bc04280
commit e49ee50d31
206 changed files with 5 additions and 10 deletions

View File

@@ -0,0 +1,61 @@
<?php
namespace Helper;
include_once(codecept_root_dir() . "lib/deployers/DeployerFactory.php");
// here you can define custom actions
// all public methods declared in helper class will be available in $I
abstract class Base extends \Codeception\Module
{
protected $deployer;
protected $deployer_components = ['db', 'fs'];
public function getDbModule()
{
return $this->getModule('\Helper\DelayedDb');
}
public function getBrowserModule()
{
return $this->getModule('PhpBrowser');
}
public function _beforeSuite($settings = array())
{
$this->deployer = \DeployerFactory::create();
$this->deployer->setComponents($this->deployer_components);
$this->deployer->start();
$this->_callbackDeployerStarted();
foreach ($this->getModules() as $module)
{
if (!$module instanceof $this)
{
$module->_beforeSuite();
}
}
}
public function _afterSuite()
{
$this->deployer->stop();
}
protected function _callbackDeployerStarted()
{
foreach ($this->deployer_components as $component)
{
$method = "reconfigure_${component}";
if (method_exists($this->deployer, $method))
{
$this->deployer->$method($this);
}
}
}
public function _before(\Codeception\TestCase $test = null)
{
$this->_callbackDeployerStarted();
}
}