|
9 | 9 | use Illuminate\Support\Stringable;
|
10 | 10 | use Mockery as m;
|
11 | 11 | use Orchestra\Testbench\TestCase;
|
12 |
| -use PHPUnit\Framework\Attributes\TestWith; |
13 | 12 | use Symfony\Component\Console\Output\OutputInterface;
|
14 | 13 |
|
15 | 14 | class MigratorTest extends TestCase
|
@@ -66,23 +65,22 @@ public function testMigrateWithoutOutput()
|
66 | 65 | $this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name'));
|
67 | 66 | }
|
68 | 67 |
|
69 |
| - #[TestWith(['2015_10_04_000000_modify_people_table.php'], 'filename with extension')] |
70 |
| - #[TestWith(['2015_10_04_000000_modify_people_table'], 'filename without extension')] |
71 |
| - public function testWithSkippedMigrations(string $filename) |
| 68 | + public function testWithSkippedMigrations() |
72 | 69 | {
|
73 | 70 | $this->app->forgetInstance('migrator');
|
74 | 71 | $this->subject = $this->app->make('migrator');
|
75 | 72 |
|
76 |
| - Migrator::withoutMigrations([$filename]); |
| 73 | + Migrator::withoutMigrations(['2015_10_04_000000_modify_people_table.php', '2016_10_04_000000_modify_people_table']); |
77 | 74 |
|
78 | 75 | $this->subject->run([__DIR__.'/fixtures']);
|
79 | 76 | $this->assertTrue(DB::getSchemaBuilder()->hasTable('people'));
|
80 | 77 | $this->assertFalse(DB::getSchemaBuilder()->hasColumn('people', 'first_name'));
|
81 |
| - $this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name')); |
| 78 | + $this->assertFalse(DB::getSchemaBuilder()->hasColumn('people', 'last_name')); |
82 | 79 |
|
83 | 80 | Migrator::withoutMigrations([]);
|
84 | 81 | $this->subject->run([__DIR__.'/fixtures']);
|
85 | 82 | $this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'first_name'));
|
| 83 | + $this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name')); |
86 | 84 | }
|
87 | 85 |
|
88 | 86 | public function testRollback()
|
|
0 commit comments