Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Illuminate\Testing;
4
 
5
use Illuminate\Contracts\Support\DeferrableProvider;
6
use Illuminate\Support\ServiceProvider;
7
use Illuminate\Testing\Concerns\TestDatabases;
8
 
9
class ParallelTestingServiceProvider extends ServiceProvider implements DeferrableProvider
10
{
11
    use TestDatabases;
12
 
13
    /**
14
     * Boot the application's service providers.
15
     *
16
     * @return void
17
     */
18
    public function boot()
19
    {
20
        if ($this->app->runningInConsole()) {
21
            $this->bootTestDatabase();
22
        }
23
    }
24
 
25
    /**
26
     * Register the service provider.
27
     *
28
     * @return void
29
     */
30
    public function register()
31
    {
32
        if ($this->app->runningInConsole()) {
33
            $this->app->singleton(ParallelTesting::class, function () {
34
                return new ParallelTesting($this->app);
35
            });
36
        }
37
    }
38
}