added test support
This commit is contained in:
parent
010914b7bd
commit
d2f733d8c2
|
@ -30,10 +30,12 @@ class DatabaseConnection
|
|||
$dbUser = $this->configController->getConfig(configKey: 'dbUser');
|
||||
$dbPassword = $this->configController->getConfig(configKey: 'dbPassword');
|
||||
|
||||
|
||||
if (!$this->configController->getConfig(configKey: 'test')) {
|
||||
// TODO create config => encryption key
|
||||
try {
|
||||
$this->dbConnection = new PDO(
|
||||
dsn : "mysql:host=$dbHost;port=$dbPort;charset=utf8mb4;dbname=$dbDatabase",
|
||||
dsn: "mysql:host=$dbHost;port=$dbPort;charset=utf8mb4;dbname=$dbDatabase",
|
||||
username: $dbUser,
|
||||
password: $dbPassword
|
||||
);
|
||||
|
@ -121,6 +123,7 @@ class DatabaseConnection
|
|||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -136,7 +139,7 @@ class DatabaseConnection
|
|||
}
|
||||
|
||||
/**
|
||||
* @return \PDO
|
||||
* @return PDO
|
||||
*/
|
||||
public function getConnection(): PDO
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue