fixed thrown exception test.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user