fixed thrown exception test.

This commit is contained in:
Abdulmhsen B. A. A
2022-03-18 14:28:41 +03:00
parent 0d8fde025d
commit 4ec33a1e21
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ final class PDOAdapter implements StorageInterface
)
);
} catch (PDOException $e) {
throw new \PDOException(sprintf('Unable to connect to storage backend. \'%s\'.', $e->getMessage()));
throw new StorageException(sprintf('Unable to connect to storage backend. \'%s\'.', $e->getMessage()));
}
$driver = $this->getDriver();

View File

@@ -48,7 +48,7 @@ class PDOAdapterTest extends TestCase
public function test_setup_throw_exception_if_invalid_dsn(): void
{
$this->expectException(PDOException::class);
$this->expectException(StorageException::class);
$storage = new PDOAdapter(new CliLogger($this->output));
$storage->setUp(['dsn' => 'not_real_driver::foo']);
}