Total Complexity | 3 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | final class EnvironmentExtensionTest extends TestCase |
||
14 | { |
||
15 | /** |
||
16 | * @test |
||
17 | */ |
||
18 | public function does_not_run_when_environment_does_not_match() |
||
19 | { |
||
20 | $context = (new MockScheduleBuilder()) |
||
21 | ->addHandler(new EnvironmentHandler('dev')) |
||
22 | ->addExtension(new EnvironmentExtension(['prod', 'stage'])) |
||
23 | ->run() |
||
24 | ; |
||
25 | |||
26 | $this->assertTrue($context->isSkipped()); |
||
27 | $this->assertTrue($context->isSuccessful()); |
||
28 | $this->assertSame('Schedule configured not to run in [dev] environment (only [prod, stage]).', $context->getSkipReason()); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * @test |
||
33 | */ |
||
34 | public function allows_schedule_to_run_if_environment_matches() |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @test |
||
47 | */ |
||
48 | public function requires_at_least_one_environment() |
||
56 |
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