1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of the doyo/code-coverage project. |
||
5 | * |
||
6 | * (c) Anthonius Munthi <[email protected]> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace Spec\Doyo\Bridge\CodeCoverage; |
||
15 | |||
16 | use Doyo\Bridge\CodeCoverage\CodeCoverage; |
||
17 | use Doyo\Bridge\CodeCoverage\Console\ConsoleIO; |
||
18 | use Doyo\Bridge\CodeCoverage\Environment\RuntimeInterface; |
||
19 | use Doyo\Bridge\CodeCoverage\Event\CoverageEvent; |
||
20 | use Doyo\Bridge\CodeCoverage\ProcessorInterface; |
||
21 | use Doyo\Bridge\CodeCoverage\TestCase; |
||
22 | use PhpSpec\ObjectBehavior; |
||
0 ignored issues
–
show
|
|||
23 | use Prophecy\Argument; |
||
0 ignored issues
–
show
The type
Prophecy\Argument 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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
24 | |||
25 | /** |
||
26 | * Class CodeCoverageSpec. |
||
27 | * |
||
28 | * @covers \Doyo\Bridge\CodeCoverage\CodeCoverage |
||
29 | */ |
||
30 | class CodeCoverageSpec extends ObjectBehavior |
||
31 | { |
||
32 | public function let( |
||
33 | ProcessorInterface $processor, |
||
34 | ConsoleIO $consoleIO, |
||
35 | RuntimeInterface $runtime, |
||
36 | TestSubscriber $subscriber |
||
37 | ) { |
||
38 | $this->beConstructedWith($processor, $consoleIO, $runtime); |
||
39 | $runtime->canCollectCodeCoverage()->willReturn(true); |
||
40 | $this->addSubscriber($subscriber); |
||
41 | } |
||
42 | |||
43 | public function it_is_initializable() |
||
44 | { |
||
45 | $this->shouldHaveType(CodeCoverage::class); |
||
46 | } |
||
47 | |||
48 | public function it_should_dispatch_coverage_refresh_event( |
||
49 | ProcessorInterface $processor, |
||
50 | TestSubscriber $subscriber |
||
51 | ) { |
||
52 | $processor->clear()->shouldBeCalledOnce(); |
||
53 | $subscriber->refresh(Argument::cetera())->shouldBeCalledOnce(); |
||
54 | |||
55 | $this->refresh(); |
||
56 | } |
||
57 | |||
58 | public function it_should_dispatch_coverage_event_start( |
||
59 | ProcessorInterface $processor, |
||
60 | TestCase $testCase, |
||
61 | TestSubscriber $subscriber |
||
62 | ) { |
||
63 | $subscriber->beforeStart(Argument::cetera())->shouldBeCalled(); |
||
64 | $subscriber->start(Argument::cetera())->shouldBeCalled(); |
||
65 | |||
66 | $processor->start($testCase)->shouldBeCalled(); |
||
67 | |||
68 | $this->start($testCase); |
||
69 | } |
||
70 | |||
71 | public function it_should_dispatch_coverage_event_stop( |
||
72 | ProcessorInterface $processor, |
||
73 | TestSubscriber $subscriber |
||
74 | ) { |
||
75 | $processor->stop()->shouldBeCalledOnce(); |
||
76 | $subscriber |
||
77 | ->stop(Argument::type(CoverageEvent::class), Argument::cetera()) |
||
78 | ->shouldBeCalledOnce(); |
||
79 | |||
80 | $this->stop(); |
||
81 | } |
||
82 | |||
83 | public function it_should_dispatch_coverage_event_complete( |
||
84 | ProcessorInterface $processor, |
||
85 | TestSubscriber $subscriber |
||
86 | ) { |
||
87 | $processor->complete()->shouldBeCalledOnce(); |
||
88 | $subscriber->complete(Argument::cetera())->shouldBeCalledOnce(); |
||
89 | $this->complete()->shouldHaveType(CoverageEvent::class); |
||
90 | } |
||
91 | } |
||
92 |
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