|
|
@ -54,6 +54,8 @@ class MigrateTest extends TestCase
|
|
|
|
$migration->expects($this->atLeastOnce())
|
|
|
|
$migration->expects($this->atLeastOnce())
|
|
|
|
->method('migrate')
|
|
|
|
->method('migrate')
|
|
|
|
->withConsecutive(
|
|
|
|
->withConsecutive(
|
|
|
|
|
|
|
|
['foo/9876_03_22_210000_random_hack.php', '9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
|
|
|
|
['foo/9999_99_99_999999_another_foo.php', '9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['foo/9876_03_22_210000_random_hack.php', '9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['foo/9876_03_22_210000_random_hack.php', '9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['foo/9999_99_99_999999_another_foo.php', '9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['foo/9999_99_99_999999_another_foo.php', '9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['foo/9876_03_22_210000_random_hack.php', '9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['foo/9876_03_22_210000_random_hack.php', '9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
@ -62,12 +64,16 @@ class MigrateTest extends TestCase
|
|
|
|
$migration->expects($this->atLeastOnce())
|
|
|
|
$migration->expects($this->atLeastOnce())
|
|
|
|
->method('setMigrated')
|
|
|
|
->method('setMigrated')
|
|
|
|
->withConsecutive(
|
|
|
|
->withConsecutive(
|
|
|
|
|
|
|
|
['9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
|
|
|
|
['9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['9999_99_99_999999_another_foo', Migrate::UP],
|
|
|
|
['9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['9876_03_22_210000_random_hack', Migrate::UP],
|
|
|
|
['4567_11_01_000000_do_stuff', Migrate::DOWN]
|
|
|
|
['4567_11_01_000000_do_stuff', Migrate::DOWN]
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$migration->run('foo', Migrate::UP);
|
|
|
|
|
|
|
|
|
|
|
|
$messages = [];
|
|
|
|
$messages = [];
|
|
|
|
$migration->setOutput(function ($text) use (&$messages) {
|
|
|
|
$migration->setOutput(function ($text) use (&$messages) {
|
|
|
|
$messages[] = $text;
|
|
|
|
$messages[] = $text;
|
|
|
|