mirror of
https://github.com/e107inc/e107.git
synced 2025-04-14 09:32:17 +02:00
Un-hard-coded database name and table prefix in e_db_pdoTest
Also corrected a typo that switched an expected and actual assertion arguments.
This commit is contained in:
parent
2465b0d16b
commit
d69217d6f0
2
e107
2
e107
@ -1 +1 @@
|
||||
Subproject commit 08f7a5d76691fe0460f18abeab581897ae56defa
|
||||
Subproject commit f5f2212b54af8c0c82b464891bee93cc1c2e0b29
|
@ -10,7 +10,7 @@ use Codeception\Lib\ModuleContainer;
|
||||
abstract class E107Base extends Base
|
||||
{
|
||||
const APP_PATH_E107_CONFIG = APP_PATH."/e107_config.php";
|
||||
public $e107_mySQLprefix = 'e107_';
|
||||
const E107_MYSQL_PREFIX = 'e107_';
|
||||
protected $preparer = null;
|
||||
|
||||
public function __construct(ModuleContainer $moduleContainer, $config = null)
|
||||
@ -49,7 +49,7 @@ abstract class E107Base extends Base
|
||||
$e107_config['mySQLuser'] = $db->_getDbUsername();
|
||||
$e107_config['mySQLpassword'] = $db->_getDbPassword();
|
||||
$e107_config['mySQLdefaultdb'] = $db->_getDbName();
|
||||
$e107_config['mySQLprefix'] = $this->e107_mySQLprefix;
|
||||
$e107_config['mySQLprefix'] = self::E107_MYSQL_PREFIX;
|
||||
|
||||
$e107_config_contents = $twig->render('e107_config.php', $e107_config);
|
||||
file_put_contents(self::APP_PATH_E107_CONFIG, $e107_config_contents);
|
||||
|
@ -119,7 +119,8 @@
|
||||
|
||||
$result = $this->db->database($this->dbConfig['mySQLdefaultdb'], MPREFIX, true);
|
||||
$this->assertTrue($result);
|
||||
$this->assertEquals("`e107_tests`.e107_", $this->db->mySQLPrefix);
|
||||
$this->assertEquals("`".$this->dbConfig["mySQLdefaultdb"]."`.".\Helper\Unit::E107_MYSQL_PREFIX,
|
||||
$this->db->mySQLPrefix);
|
||||
|
||||
|
||||
|
||||
@ -197,7 +198,7 @@
|
||||
'dblog_user_id' => '1',
|
||||
);
|
||||
|
||||
$this->assertEquals($data, $expected);
|
||||
$this->assertEquals($expected, $data);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user