mirror of
https://github.com/e107inc/e107.git
synced 2025-10-10 12:34:49 +02:00
Acceptance test checks the output of e107's /install.php on first load Also added documentation on acceptance tests to README.md
32 lines
739 B
PHP
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();
|
|
}
|
|
}
|