Skip to content

Commit 6f13580

Browse files
committed
test with an array
1 parent 8d65bc3 commit 6f13580

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/Integration/Migration/MigratorTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Illuminate\Support\Stringable;
1010
use Mockery as m;
1111
use Orchestra\Testbench\TestCase;
12-
use PHPUnit\Framework\Attributes\TestWith;
1312
use Symfony\Component\Console\Output\OutputInterface;
1413

1514
class MigratorTest extends TestCase
@@ -66,23 +65,22 @@ public function testMigrateWithoutOutput()
6665
$this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name'));
6766
}
6867

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()
7269
{
7370
$this->app->forgetInstance('migrator');
7471
$this->subject = $this->app->make('migrator');
7572

76-
Migrator::withoutMigrations([$filename]);
73+
Migrator::withoutMigrations(['2015_10_04_000000_modify_people_table.php', '2016_10_04_000000_modify_people_table']);
7774

7875
$this->subject->run([__DIR__.'/fixtures']);
7976
$this->assertTrue(DB::getSchemaBuilder()->hasTable('people'));
8077
$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'));
8279

8380
Migrator::withoutMigrations([]);
8481
$this->subject->run([__DIR__.'/fixtures']);
8582
$this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'first_name'));
83+
$this->assertTrue(DB::getSchemaBuilder()->hasColumn('people', 'last_name'));
8684
}
8785

8886
public function testRollback()

0 commit comments

Comments
 (0)