1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-23 19:32:29 +01:00
BookStack/tests/Helpers/TestServiceProvider.php

27 lines
719 B
PHP

<?php
namespace Tests\Helpers;
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');
});
}
}