File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ protected function createServiceManager(array $dbConfig): ServiceLocatorInterfac
3737 #[Override]
3838 protected function setUp (): void
3939 {
40- if (! extension_loaded ('pdo_sqlite ' )) {
41- $ this ->markTestSkipped ('Adapter factory tests require pdo_sqlite ' );
42- }
43-
4440 $ this ->factory = new AdapterServiceFactory ();
4541 }
4642
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ public function testMagicGet(): void
245245 protected function setUp (): void
246246 {
247247 $ this ->mockConnection = $ this ->createMock (ConnectionInterface::class);
248- $ this ->mockPlatform = new SqlitePlatform ();
248+ $ this ->mockPlatform = new SqlitePlatform ($ this -> createMock (PdoDriverInterface::class) );
249249 $ this ->mockStatement = $ this ->getMockBuilder (Statement::class)->getMock ();
250250 $ this ->mockDriver = $ this ->getMockBuilder (Pdo::class)
251251 ->setConstructorArgs ([
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ final class SqliteTest extends TestCase
4040 #[Override]
4141 protected function setUp (): void
4242 {
43- $ this ->platform = new Sqlite ();
43+ $ this ->platform = new Sqlite (new PDO (
44+ dsn: "sqlite::memory:mydb.sqlite " ,
45+ ));
4446 }
4547
4648 public function testGetName (): void
@@ -191,10 +193,9 @@ public function testCanCloseConnectionAfterQuoteValue(): void
191193 touch ($ filePath );
192194 }
193195
194- $ driver = new Driver (new Connection ([
195- 'driver ' => 'Pdo_Sqlite ' ,
196- 'database ' => ':memory ' ,
197- ]));
196+ $ driver = (new PdoDriverFactory ())->__invoke (
197+ $ this ->createMock (ContainerInterface::class)
198+ );
198199
199200 $ this ->platform ->setDriver ($ driver );
200201 $ this ->platform ->quoteValue ("some; random]/ value " );
You can’t perform that action at this time.
0 commit comments