File tree Expand file tree Collapse file tree 3 files changed +7
-17
lines changed
Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Original file line number Diff line number Diff line change 5454 if [ ${{ matrix.db-type }} == 'mysql' ]; then
5555 sudo service mysql start && mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE IF NOT EXISTS test_migrator;';
5656 fi
57- composer run-tests- ${{ matrix.db-type }}
57+ composer ${{ matrix.db-type }}
Original file line number Diff line number Diff line change 2828 }
2929 },
3030 "scripts" : {
31- "run-tests- mysql" : " bash run_tests.sh Mysql" ,
32- "run-tests- pgsql" : " bash run_tests.sh Postgres" ,
33- "run-tests- sqlite" : " bash run_tests.sh Sqlite"
31+ "mysql" : " bash run_tests.sh Mysql" ,
32+ "pgsql" : " bash run_tests.sh Postgres" ,
33+ "sqlite" : " bash run_tests.sh Sqlite"
3434 },
3535 "config" : {
3636 "sort-packages" : true
3737 }
38- }
38+ }
Original file line number Diff line number Diff line change 1414namespace CakephpTestMigrator \Test \TestCase ;
1515
1616
17+ use Cake \Datasource \ConnectionManager ;
1718use Cake \TestSuite \TestCase ;
1819use CakephpTestMigrator \Migrator ;
19- use CakephpTestSuiteLight \FixtureManager ;
20- use CakephpTestSuiteLight \Sniffer \BaseTableSniffer ;
2120
2221class MigratorTest extends TestCase
2322{
@@ -26,28 +25,19 @@ class MigratorTest extends TestCase
2625 */
2726 public $ migrator ;
2827
29- /**
30- * @var BaseTableSniffer
31- */
32- public $ sniffer ;
33-
3428 public function setUp ()
3529 {
3630 $ this ->migrator = new Migrator ();
37-
38- $ fm = new FixtureManager ();
39- $ this ->sniffer = $ fm ->getSniffer ('test ' );
4031 }
4132
4233 public function tearDown ()
4334 {
4435 unset($ this ->migrator );
45- unset($ this ->sniffer );
4636 }
4737
4838 private function fetchMigrationsInDB (string $ dbTable ): array
4939 {
50- return $ this -> sniffer -> fetchQuery ("SELECT migration_name FROM $ dbTable " );
40+ return ConnectionManager:: get ( ' test ' )-> execute ("SELECT migration_name FROM $ dbTable " )-> fetch ( );
5141 }
5242
5343 public function testGetConfig ()
You can’t perform that action at this time.
0 commit comments