Skip to content

Commit

Permalink
Revert "Simplify."
Browse files Browse the repository at this point in the history
This reverts commit 1d66605.
  • Loading branch information
duncanmcclean committed Oct 30, 2024
1 parent 1d66605 commit 04a16cf
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

namespace Statamic\Importer\Tests;

use Orchestra\Testbench\Attributes\WithMigration;
use Statamic\Facades\Config;
use Statamic\Facades\Site;
use Statamic\Importer\ServiceProvider;
use Statamic\Testing\AddonTestCase;

#[WithMigration('queue')]
use function Orchestra\Testbench\artisan;

abstract class TestCase extends AddonTestCase
{
protected string $addonServiceProvider = ServiceProvider::class;
Expand All @@ -35,4 +35,20 @@ protected function setSites($sites): void

Config::set('statamic.system.multisite', Site::hasMultiple());
}

/**
* Define database migrations.
*
* @return void
*/
protected function defineDatabaseMigrations()
{
artisan($this, 'queue:batches-table');

artisan($this, 'migrate', ['--database' => 'testing']);

$this->beforeApplicationDestroyed(
fn () => artisan($this, 'migrate:rollback', ['--database' => 'testing'])
);
}
}

0 comments on commit 04a16cf

Please sign in to comment.