Skip to content

Commit

Permalink
Testbench updates (#21)
Browse files Browse the repository at this point in the history
* Testbench updates

* Fix styling

---------

Co-authored-by: duncanmcclean <[email protected]>
  • Loading branch information
duncanmcclean and duncanmcclean authored Oct 31, 2024
1 parent 9a51223 commit 3d64a75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 21 deletions.
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@
}
},
"require": {
"statamic/cms": "^5.35.0",
"statamic/cms": "^5.0",
"spatie/simple-excel": "^3.7",
"symfony/dom-crawler": "^7.1",
"pixelfear/composer-dist-plugin": "^0.1.5"
"pixelfear/composer-dist-plugin": "^0.1.5",
"laravel/framework": "11.*"
},
"require-dev": {
"laravel/pint": "^1.18",
"orchestra/testbench": "^8.0 || ^9.0.2",
"orchestra/testbench": "^8.0 || ^9.5.6",
"phpunit/phpunit": "^10.0"
},
"config": {
Expand Down
20 changes: 2 additions & 18 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;

use function Orchestra\Testbench\artisan;

#[WithMigration('queue')]
abstract class TestCase extends AddonTestCase
{
protected string $addonServiceProvider = ServiceProvider::class;
Expand All @@ -35,20 +35,4 @@ 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 3d64a75

Please sign in to comment.