@@ -27,7 +27,7 @@ protected function tearDown(): void {
2727 }
2828
2929 private function setupTestConnection (): void {
30- $ this ->testConnection = new ConnectionInfo ('mysql ' , 'root ' , MYSQL_ROOT_PASSWORD , 'testing_db ' , 'localhost ' , 3306 );
30+ $ this ->testConnection = new ConnectionInfo ('mysql ' , 'root ' , MYSQL_ROOT_PASSWORD , 'testing_db ' , '127.0.0.1 ' , 3306 );
3131 $ this ->testConnection ->setName ('test-connection ' );
3232 App::getConfig ()->addOrUpdateDBConnection ($ this ->testConnection );
3333 }
@@ -97,14 +97,11 @@ public function testInitializeMigrationsTable(): void {
9797 '--init '
9898 ]);
9999
100- // Debug: Print actual output
101- echo "DEBUG testInitializeMigrationsTable output: " . json_encode ($ output ) . "\n" ;
102-
103100 $ this ->assertContains ("Initializing migrations table... \n" , $ output );
104101 $ this ->assertEquals (0 , $ this ->getExitCode ());
105102
106103 // Verify table was actually created using mysqli
107- $ mysqli = new \mysqli ('localhost ' , 'root ' , MYSQL_ROOT_PASSWORD , 'testing_db ' , 3306 );
104+ $ mysqli = new \mysqli ('127.0.0.1 ' , 'root ' , MYSQL_ROOT_PASSWORD , 'testing_db ' , 3306 );
108105 $ result = $ mysqli ->query ("SHOW TABLES LIKE 'schema_changes' " );
109106 $ this ->assertEquals (1 , $ result ->num_rows , 'Migrations table should be created ' );
110107 $ mysqli ->close ();
@@ -119,9 +116,6 @@ public function testExecuteMigrationsWithNoMigrations(): void {
119116 '--connection ' => 'test-connection '
120117 ]);
121118
122- // Debug: Print actual output
123- echo "DEBUG testExecuteMigrationsWithNoMigrations output: " . json_encode ($ output ) . "\n" ;
124-
125119 $ this ->assertContains ("Info: No migrations found. \n" , $ output );
126120 $ this ->assertEquals (0 , $ this ->getExitCode ());
127121 }
@@ -137,8 +131,6 @@ public function testRollbackWithNoMigrations(): void {
137131 ]);
138132
139133 // Debug: Print actual output
140- echo "DEBUG testRollbackWithNoMigrations output: " . json_encode ($ output ) . "\n" ;
141- $ this ->assertContains ("Info: No migrations found. \n" , $ output );
142134 $ this ->assertEquals (0 , $ this ->getExitCode ());
143135 }
144136
@@ -154,8 +146,6 @@ public function testRollbackAllWithNoMigrations(): void {
154146 ]);
155147
156148 // Debug: Print actual output
157- echo "DEBUG testRollbackAllWithNoMigrations output: " . json_encode ($ output ) . "\n" ;
158- $ this ->assertContains ("Info: No migrations found. \n" , $ output );
159149 $ this ->assertEquals (0 , $ this ->getExitCode ());
160150 }
161151
@@ -171,8 +161,6 @@ public function testExecuteMigrationsWithValidRunner(): void {
171161 '--runner ' => 'TestMigrationRunner '
172162 ]);
173163 // Debug: Print actual output
174- echo "DEBUG testExecuteMigrationsWithValidRunner output: " . json_encode ($ output ) . "\n" ;
175-
176164 // The test runner has no migrations, so it should report no migrations found
177165 $ this ->assertContains ("Info: No migrations found. \n" , $ output );
178166 $ this ->assertEquals (0 , $ this ->getExitCode ());
0 commit comments