1
0
mirror of https://github.com/e107inc/e107.git synced 2025-10-10 12:34:49 +02:00
Files
php-e107/tests/_support/Helper/Acceptance.php
Deltik a42025c5c6 First working acceptance test
Acceptance test checks the output of e107's /install.php on first load

Also added documentation on acceptance tests to README.md
2018-02-08 05:04:42 -06:00

32 lines
739 B
PHP

<?php
namespace Helper;
include_once(__DIR__ . "/../../../lib/deployers/cpanel_deployer.php");
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class Acceptance extends \Codeception\Module
{
protected $deployer;
public function _beforeSuite($settings = array())
{
$secrets = $settings['secrets'];
if ($secrets['cpanel']['enabled'] === '1')
{
$this->deployer = new \cPanelDeployer($secrets['cpanel']);
$retcode = $this->deployer->start();
if ($retcode === true)
{
$url = $this->deployer->getUrl();
$this->getModule('PhpBrowser')->_reconfigure(array('url' => $url));
}
}
}
public function _afterSuite()
{
$this->deployer->stop();
}
}