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 SilverStripe\StaticPublishQueue\Extension\Engine\SiteTreePublishingEngine; |
||
10 | use SilverStripe\StaticPublishQueue\Test\QueuedJobsTestService; |
||
11 | use Symbiote\QueuedJobs\Services\QueuedJobHandler; |
||
12 | use Symbiote\QueuedJobs\Services\QueuedJobService; |
||
13 | use Symbiote\QueuedJobs\Tests\QueuedJobsTest\QueuedJobsTest_Handler; |
||
0 ignored issues
–
show
|
|||
14 | |||
15 | class StaticPublisherState implements TestState |
||
16 | { |
||
17 | public function setUp(SapphireTest $test) |
||
18 | { |
||
19 | // Prepare queued jobs related functionality for unit test run |
||
20 | // Disable queue logging |
||
21 | Injector::inst()->registerService(new QueuedJobsTest_Handler(), QueuedJobHandler::class); |
||
22 | |||
23 | // Disable special actions of the queue service |
||
24 | Config::modify()->set(QueuedJobService::class, 'use_shutdown_function', false); |
||
25 | |||
26 | // It seems Injector doesn't cover all cases so we force-inject a test service which is suitable for unit tests |
||
27 | Injector::inst()->registerService(new QueuedJobsTestService(), QueuedJobService::class); |
||
28 | SiteTreePublishingEngine::setQueueService(QueuedJobService::singleton()); |
||
29 | } |
||
30 | |||
31 | public function tearDown(SapphireTest $test) |
||
32 | { |
||
33 | } |
||
34 | |||
35 | public function setUpOnce($class) |
||
36 | { |
||
37 | } |
||
38 | |||
39 | public function tearDownOnce($class) |
||
40 | { |
||
41 | } |
||
42 | } |
||
43 |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths