@@ -24,6 +24,10 @@ class ConnectionTest extends TestCase
2424{
2525 public function testTableNotFoundExceptionWithEnabledAutoSetup ()
2626 {
27+ if (!class_exists (DBALConnection::class)) {
28+ $ this ->markTestSkipped ('Unable to run this test without Doctrine ' );
29+ }
30+
2731 $ dbalConnection = $ this ->getDbalConnectionMock (TableNotFoundException::class);
2832 $ transportConnection = $ this ->getMockBuilder (Connection::class)
2933 ->setConstructorArgs ([['auto_setup ' => true ], $ dbalConnection ])
@@ -39,6 +43,10 @@ public function testTableNotFoundExceptionWithEnabledAutoSetup()
3943
4044 public function testTableNotFoundExceptionWithDisabledAutoSetup ()
4145 {
46+ if (!class_exists (DBALConnection::class)) {
47+ $ this ->markTestSkipped ('Unable to run this test without Doctrine ' );
48+ }
49+
4250 $ dbalConnection = $ this ->getDbalConnectionMock (TableNotFoundException::class);
4351 $ transportConnection = $ this ->getMockBuilder (Connection::class)
4452 ->setConstructorArgs ([['auto_setup ' => false ], $ dbalConnection ])
@@ -54,6 +62,10 @@ public function testTableNotFoundExceptionWithDisabledAutoSetup()
5462
5563 public function testDriverException ()
5664 {
65+ if (!class_exists (DBALConnection::class)) {
66+ $ this ->markTestSkipped ('Unable to run this test without Doctrine ' );
67+ }
68+
5769 $ dbalConnection = $ this ->getDbalConnectionMock (DriverException::class);
5870 $ transportConnection = $ this ->getMockBuilder (Connection::class)
5971 ->setConstructorArgs ([['auto_setup ' => false ], $ dbalConnection ])
0 commit comments