Passed
Pull Request — master (#132)
by
unknown
02:10
created

QueueTestState::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace SilverStripe\StaticPublishQueue\Dev;
4
5
use SilverStripe\Core\Config\Config;
6
use SilverStripe\Core\Injector\Injector;
7
use SilverStripe\Dev\SapphireTest;
8
use SilverStripe\Dev\State\TestState;
9
use Symbiote\QueuedJobs\Services\QueuedJobHandler;
10
use Symbiote\QueuedJobs\Services\QueuedJobService;
11
use Symbiote\QueuedJobs\Tests\QueuedJobsTest\QueuedJobsTest_Handler;
0 ignored issues
show
Bug introduced by
The type Symbiote\QueuedJobs\Test...\QueuedJobsTest_Handler was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
13
class QueueTestState implements TestState
14
{
15
    public function setUp(SapphireTest $test)
16
    {
17
        Injector::inst()->registerService(new QueuedJobsTest_Handler(), QueuedJobHandler::class);
18
        Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false);
19
    }
20
21
    public function tearDown(SapphireTest $test)
22
    {
23
    }
24
25
    public function setUpOnce($class)
26
    {
27
    }
28
29
    public function tearDownOnce($class)
30
    {
31
    }
32
}
33