@@ -62,7 +62,7 @@ public function setUp(): void
6262 parent ::setUp ();
6363
6464 $ this ->connection = ConnectionManager::get ('test ' );
65- $ this ->connection ->connect ();
65+ $ this ->connection ->getDriver ()-> connect ();
6666 $ this ->pdo = $ this ->connection ->getDriver ()->getConnection ();
6767 $ this ->connection ->execute ('DROP TABLE IF EXISTS phinxlog ' );
6868 $ this ->connection ->execute ('DROP TABLE IF EXISTS numbers ' );
@@ -110,7 +110,7 @@ public function testExecute()
110110 $ this ->commandTester ->getDisplay ()
111111 );
112112
113- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
113+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
114114 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
115115 $ this ->assertEquals ('20150724233100 ' , $ result [1 ]['version ' ]);
116116 $ this ->assertEquals ('20150826191400 ' , $ result [2 ]['version ' ]);
@@ -134,7 +134,7 @@ public function testExecute()
134134 $ this ->commandTester ->getDisplay ()
135135 );
136136
137- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
137+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
138138 $ this ->assertSame (3 , $ result );
139139
140140 $ config = $ this ->command ->getConfig ();
@@ -202,7 +202,7 @@ public function testExecuteAll()
202202 $ this ->commandTester ->getDisplay ()
203203 );
204204
205- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
205+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
206206 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
207207 $ this ->assertEquals ('20150724233100 ' , $ result [1 ]['version ' ]);
208208 $ this ->assertEquals ('20150826191400 ' , $ result [2 ]['version ' ]);
@@ -246,7 +246,7 @@ public function testExecuteTarget()
246246 $ this ->commandTester ->getDisplay ()
247247 );
248248
249- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
249+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
250250 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
251251
252252 $ this ->commandTester ->execute ([
@@ -269,11 +269,11 @@ public function testExecuteTarget()
269269 $ this ->commandTester ->getDisplay ()
270270 );
271271
272- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
272+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
273273 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
274274 $ this ->assertEquals ('20150724233100 ' , $ result [1 ]['version ' ]);
275275 $ this ->assertEquals ('20150826191400 ' , $ result [2 ]['version ' ]);
276- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
276+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
277277 $ this ->assertSame (3 , $ result );
278278
279279 $ this ->commandTester ->execute ([
@@ -304,7 +304,7 @@ public function testExecuteTargetWithExclude()
304304 $ this ->commandTester ->getDisplay ()
305305 );
306306
307- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
307+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
308308 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
309309
310310 $ this ->commandTester ->execute ([
@@ -324,10 +324,10 @@ public function testExecuteTargetWithExclude()
324324 $ this ->commandTester ->getDisplay ()
325325 );
326326
327- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
327+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
328328 $ this ->assertEquals ('20150704160200 ' , $ result [0 ]['version ' ]);
329329 $ this ->assertEquals ('20150724233100 ' , $ result [1 ]['version ' ]);
330- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
330+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
331331 $ this ->assertSame (2 , $ result );
332332
333333 $ this ->commandTester ->execute ([
@@ -359,7 +359,7 @@ public function testExecuteTargetWithOnly()
359359 $ this ->commandTester ->getDisplay ()
360360 );
361361
362- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
362+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
363363 $ this ->assertEquals ('20150724233100 ' , $ result [0 ]['version ' ]);
364364
365365 $ this ->commandTester ->execute ([
@@ -375,10 +375,10 @@ public function testExecuteTargetWithOnly()
375375 $ this ->commandTester ->getDisplay ()
376376 );
377377
378- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
378+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
379379 $ this ->assertEquals ('20150826191400 ' , $ result [1 ]['version ' ]);
380380 $ this ->assertEquals ('20150724233100 ' , $ result [0 ]['version ' ]);
381- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
381+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
382382 $ this ->assertSame (2 , $ result );
383383
384384 $ this ->commandTester ->execute ([
@@ -414,7 +414,7 @@ public function testExecuteWithVersionAsArgument()
414414 $ this ->commandTester ->getDisplay ()
415415 );
416416
417- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
417+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->fetchAll ('assoc ' );
418418 $ this ->assertSame (1 , count ($ result ));
419419 $ this ->assertEquals ('20150724233100 ' , $ result [0 ]['version ' ]);
420420 }
@@ -428,7 +428,7 @@ public function testExecuteInvalidUseOfOnlyAndExclude()
428428 '--source ' => 'TestsMigrations ' ,
429429 ]);
430430
431- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
431+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
432432 $ this ->assertSame (0 , $ result );
433433 $ this ->assertStringContainsString (
434434 'You should use `--exclude` OR `--only` (not both) along with a `--target` ! ' ,
@@ -442,7 +442,7 @@ public function testExecuteInvalidUseOfOnlyAndExclude()
442442 '--source ' => 'TestsMigrations ' ,
443443 ]);
444444
445- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
445+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
446446 $ this ->assertSame (0 , $ result );
447447 $ this ->assertStringContainsString (
448448 'You should use `--exclude` OR `--only` (not both) along with a `--target` ! ' ,
@@ -458,7 +458,7 @@ public function testExecuteInvalidUseOfOnlyAndExclude()
458458 '--source ' => 'TestsMigrations ' ,
459459 ]);
460460
461- $ result = $ this ->connection ->newQuery ()-> select ( ['* ' ])-> from ( 'phinxlog ' )->execute ()->count ();
461+ $ result = $ this ->connection ->selectQuery ( ['* ' ], 'phinxlog ' )->execute ()->count ();
462462 $ this ->assertSame (0 , $ result );
463463 $ this ->assertStringContainsString (
464464 'You should use `--exclude` OR `--only` (not both) along with a `--target` ! ' ,
0 commit comments