BookStack/tests/TestServiceProvider.php
Dan Brown f21669c0c9
Cleaned testing service provider usage
Moved testing content out of AppServiceProvider, to a testing-specific
service provider. Updated docs and added composer commands to support
parallel testing.
Also reverted unintentional change to wysiwyg/config.js.
2022-09-27 01:27:51 +01:00

27 lines
711 B
PHP

<?php
namespace Tests;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\ParallelTesting;
use Illuminate\Support\ServiceProvider;
class TestServiceProvider extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
// Tell Laravel's parallel testing functionality to seed the test
// databases with the DummyContentSeeder upon creation.
// This is only done for initial database creation. Seeding
// won't occur on every run.
ParallelTesting::setUpTestDatabase(function ($database, $token) {
Artisan::call('db:seed --class=DummyContentSeeder');
});
}
}