| Total Complexity | 4 | 
| Total Lines | 26 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 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) | ||
| 33 | } | ||
| 34 | |||
| 35 | public function setUpOnce($class) | ||
| 36 |     { | ||
| 37 | } | ||
| 38 | |||
| 39 | public function tearDownOnce($class) | ||
| 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