diff --git a/Tests/Command/DropDatabaseDoctrineTest.php b/Tests/Command/DropDatabaseDoctrineTest.php index eef28598a..2abc77333 100644 --- a/Tests/Command/DropDatabaseDoctrineTest.php +++ b/Tests/Command/DropDatabaseDoctrineTest.php @@ -52,7 +52,11 @@ public function testExecute(array $options) : void */ public function testItThrowsWhenUsingIfExistsWithAnIncompatibleDriver(array $options) : void { - static::expectException(DBALException::class); + if (class_exists(DBALException::class)) { + $this->expectException(DBALException::class); + } else { + $this->expectException(Doctrine\DBAL\Exception::class); + } $this->testExecute($options); }