Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphjsmit authored and github-actions[bot] committed Mar 14, 2024
1 parent fbcc845 commit 42ea9a2
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,43 @@

class TestCase extends Orchestra
{
use RefreshDatabase;
protected function setUp(): void
{
parent::setUp();
Factory::guessFactoryNamesUsing(fn(string $modelName) => 'RalphJSmit\\Filament\\SEO\\Database\\Factories\\' . class_basename($modelName) . 'Factory');
View::addLocation(__DIR__ . '/Fixtures/resources/views');
// Laravel 11 changed the way database migrations are loaded and removed the Doctrine DBAL dependency.
// That behaviour broke the previous way of running tests using `getEnvironmentSetUp()`.
if ( version_compare(Application::VERSION, '11', '>=') ) {
(include __DIR__ . '/Fixtures/migrations/create_test_tables.php')->up();
(include __DIR__ . '/../vendor/ralphjsmit/laravel-seo/database/migrations/create_seo_table.php.stub')->up();
}
}
protected function getPackageProviders($app): array
{
return [
LivewireServiceProvider::class,
FilamentServiceProvider::class,
FormsServiceProvider::class,
LaravelSEOServiceProvider::class,
FilamentSEOServiceProvider::class,
SupportServiceProvider::class,
];
}
protected function getEnvironmentSetUp($app): void
{
if ( version_compare(Application::VERSION, '11', '>=') ) {
config()->set('database.default', 'testing');
(include __DIR__ . '/Fixtures/migrations/create_test_tables.php')->up();
(include __DIR__ . '/../vendor/ralphjsmit/laravel-seo/database/migrations/create_seo_table.php.stub')->up();
}
}
use RefreshDatabase;

protected function setUp(): void
{
parent::setUp();

Factory::guessFactoryNamesUsing(fn (string $modelName) => 'RalphJSmit\\Filament\\SEO\\Database\\Factories\\' . class_basename($modelName) . 'Factory');

View::addLocation(__DIR__ . '/Fixtures/resources/views');

// Laravel 11 changed the way database migrations are loaded and removed the Doctrine DBAL dependency.
// That behaviour broke the previous way of running tests using `getEnvironmentSetUp()`.
if (version_compare(Application::VERSION, '11', '>=')) {
(include __DIR__ . '/Fixtures/migrations/create_test_tables.php')->up();
(include __DIR__ . '/../vendor/ralphjsmit/laravel-seo/database/migrations/create_seo_table.php.stub')->up();
}
}

protected function getPackageProviders($app): array
{
return [
LivewireServiceProvider::class,
FilamentServiceProvider::class,
FormsServiceProvider::class,
LaravelSEOServiceProvider::class,
FilamentSEOServiceProvider::class,
SupportServiceProvider::class,
];
}

protected function getEnvironmentSetUp($app): void
{
if (version_compare(Application::VERSION, '11', '>=')) {
config()->set('database.default', 'testing');

(include __DIR__ . '/Fixtures/migrations/create_test_tables.php')->up();
(include __DIR__ . '/../vendor/ralphjsmit/laravel-seo/database/migrations/create_seo_table.php.stub')->up();
}
}
}

0 comments on commit 42ea9a2

Please sign in to comment.