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

@ -20,7 +20,7 @@ class FeatureFlagsTest extends \MailPoetTest {
parent::_before();
$this->repository = $this->diContainer->get(FeatureFlagsRepository::class);
$tableName = $this->entityManager->getClassMetadata(FeatureFlagEntity::class)->getTableName();
$this->entityManager->getConnection()->executeUpdate("TRUNCATE $tableName");
$this->entityManager->getConnection()->executeStatement("TRUNCATE $tableName");
}
public function testItReturnsDefaults() {

View File

@ -62,6 +62,6 @@ class UserFlagsTest extends \MailPoetTest {
private function cleanup() {
$tableName = $this->entityManager->getClassMetadata(UserFlagEntity::class)->getTableName();
$this->entityManager->getConnection()->executeUpdate("TRUNCATE $tableName");
$this->entityManager->getConnection()->executeStatement("TRUNCATE $tableName");
}
}