mirror of
https://github.com/e107inc/e107.git
synced 2025-10-11 04:54:26 +02:00
Partial teardown functionality for cPanel deployer
Also renamed class Prepare_cPanel to cPanelDeployer
This commit is contained in:
@@ -1,24 +1,31 @@
|
||||
<?php
|
||||
namespace Helper;
|
||||
include_once(__DIR__ . "/../../../lib/prepare_cpanel.php");
|
||||
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')
|
||||
{
|
||||
$prepare = new \Prepare_cPanel($secrets['cpanel']);
|
||||
$retcode = $prepare->start();
|
||||
$this->deployer = new \cPanelDeployer($secrets['cpanel']);
|
||||
$retcode = $this->deployer->start();
|
||||
if ($retcode === true)
|
||||
{
|
||||
$domain = $prepare->getDomain();
|
||||
$domain = $this->deployer->getDomain();
|
||||
$this->getModule('PhpBrowser')->_reconfigure(array('url' => "http://${domain}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function _afterSuite()
|
||||
{
|
||||
$this->deployer->stop();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user