Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Mar 25, 2024
1 parent 201eaef commit e6da5c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Concerns/InteractsWithMigrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait InteractsWithMigrations
*
* @var array<int, \Orchestra\Testbench\Database\MigrateProcessor>
*/
protected $cachedTestSchemaMigrators = [];
protected $testCachedMigratorProcessors = [];

/**
* Teardown the test environment.
Expand All @@ -31,11 +31,11 @@ trait InteractsWithMigrations
*/
protected function tearDownInteractsWithMigrations(): void
{
if (\count($this->cachedTestSchemaMigrators) > 0 && static::usesTestingConcern(RefreshDatabase::class)) {
if (\count($this->testCachedMigratorProcessors) > 0 && static::usesTestingConcern(RefreshDatabase::class)) {
ResetRefreshDatabaseState::run();
}

foreach ($this->cachedTestSchemaMigrators as $migrator) {
foreach ($this->testCachedMigratorProcessors as $migrator) {
$migrator->rollback();
}
}
Expand Down Expand Up @@ -76,7 +76,7 @@ protected function loadMigrationsWithoutRollbackFrom($paths): void
$migrator = new MigrateProcessor($this, $this->resolvePackageMigrationsOptions($paths));
$migrator->up();

array_unshift($this->cachedTestSchemaMigrators, $migrator);
array_unshift($this->testCachedMigratorProcessors, $migrator);

$this->resetApplicationArtisanCommands($this->app);
}
Expand Down Expand Up @@ -131,7 +131,7 @@ protected function loadLaravelMigrationsWithoutRollback($database = []): void
$migrator = new MigrateProcessor($this, $this->resolveLaravelMigrationsOptions($options));
$migrator->up();

array_unshift($this->cachedTestSchemaMigrators, $migrator);
array_unshift($this->testCachedMigratorProcessors, $migrator);

$this->resetApplicationArtisanCommands($this->app);
}
Expand Down Expand Up @@ -160,7 +160,7 @@ protected function runLaravelMigrationsWithoutRollback($database = []): void
$migrator = new MigrateProcessor($this, $this->resolveLaravelMigrationsOptions($database));
$migrator->up();

array_unshift($this->cachedTestSchemaMigrators, $migrator);
array_unshift($this->testCachedMigratorProcessors, $migrator);

$this->resetApplicationArtisanCommands($this->app);
}
Expand Down

0 comments on commit e6da5c4

Please sign in to comment.