Replace deprecated doctrine methods in tests directory

[MAILPOET-3889]
This commit is contained in:
Rostislav Wolny
2021-10-27 10:43:39 +02:00
committed by Veljko V
parent 73a9bed483
commit b8d72522a2
10 changed files with 45 additions and 41 deletions

View File

@@ -125,7 +125,7 @@ class SettingsControllerTest extends \MailPoetTest {
private function createOrUpdateSetting($name, $value) {
$tableName = $this->entityManager->getClassMetadata(SettingEntity::class)->getTableName();
$this->connection->executeUpdate("
$this->connection->executeStatement("
INSERT INTO $tableName (name, value) VALUES (?, ?)
ON DUPLICATE KEY UPDATE value = ?
", [$name, $value, $value]);
@@ -133,6 +133,6 @@ class SettingsControllerTest extends \MailPoetTest {
private function getSettingValue($name) {
$tableName = $this->entityManager->getClassMetadata(SettingEntity::class)->getTableName();
return $this->connection->executeQuery("SELECT value FROM $tableName WHERE name = ?", [$name])->fetchColumn();
return $this->connection->executeQuery("SELECT value FROM $tableName WHERE name = ?", [$name])->fetchOne();
}
}