File tree Expand file tree Collapse file tree
tests/system/Database/Migrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -186,6 +186,24 @@ public function testGetMigrationNumberReturnsZeroIfNoneFound()
186186 $ this ->assertSame ('0 ' , $ method ('Foo ' ));
187187 }
188188
189+ public function testGetMigrationNameDashes ()
190+ {
191+ $ runner = new MigrationRunner ($ this ->config );
192+
193+ $ method = $ this ->getPrivateMethodInvoker ($ runner , 'getMigrationName ' );
194+
195+ $ this ->assertSame ('Foo ' , $ method ('2019-08-06-235100_Foo ' ));
196+ }
197+
198+ public function testGetMigrationNameUnderscores ()
199+ {
200+ $ runner = new MigrationRunner ($ this ->config );
201+
202+ $ method = $ this ->getPrivateMethodInvoker ($ runner , 'getMigrationName ' );
203+
204+ $ this ->assertSame ('Foo ' , $ method ('2019_08_06_235100_Foo ' ));
205+ }
206+
189207 public function testSetSilentStoresValue ()
190208 {
191209 $ runner = new MigrationRunner ($ this ->config );
You can’t perform that action at this time.
0 commit comments