1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 21:32:09 +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,54 @@
<?php
namespace Helper;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
class DelayedDb extends \Codeception\Module\Db
{
protected $requiredFields = [];
public function _initialize()
{
// Noop
}
public function _delayedInitialize()
{
return parent::_initialize();
}
public function _getDbHostname()
{
$matches = [];
$matched = preg_match('~host=([^;]+)~s', $this->config['dsn'], $matches);
if (!$matched)
{
return false;
}
return $matches[1];
}
public function _getDbName()
{
$matches = [];
$matched = preg_match('~dbname=([^;]+)~s', $this->config['dsn'], $matches);
if (!$matched)
{
return false;
}
return $matches[1];
}
public function _getDbUsername()
{
return $this->config['user'];
}
public function _getDbPassword()
{
return $this->config['password'];
}
}