its_coverageInfo_should_write_info_output()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
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\Console;
15
16
use Doyo\Bridge\CodeCoverage\Console\Console;
17
use Doyo\Bridge\CodeCoverage\Console\ConsoleIO;
18
use PhpSpec\ObjectBehavior;
0 ignored issues
show
Bug introduced by
The type PhpSpec\ObjectBehavior 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...
19
use Symfony\Component\Console\Style\StyleInterface;
0 ignored issues
show
Bug introduced by
The type Symfony\Component\Console\Style\StyleInterface 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...
20
21
class ConsoleSpec extends ObjectBehavior
22
{
23
    public function let(
24
        StyleInterface $style
25
    ) {
26
        $this->beConstructedWith($style);
27
    }
28
29
    public function it_should_be_a_ConsoleIO()
30
    {
31
        $this->shouldHaveType(Console::class);
32
        $this->shouldImplement(ConsoleIO::class);
33
    }
34
35
    public function its_coverageSection_should_write_section_output(
36
        StyleInterface $style
37
    ) {
38
        $style->section('coverage: foo')->shouldBeCalledOnce();
39
        $this->coverageSection('foo');
40
    }
41
42
    public function its_coverageInfo_should_write_info_output(
43
        StyleInterface $style
44
    ) {
45
        $style->text('info')->shouldBeCalledOnce();
46
        $this->coverageInfo('info');
47
    }
48
49
    public function its_coverageInfo_should_write_error_output(
50
        StyleInterface $style
51
    ) {
52
        $style->error('foo')->shouldBeCalledOnce();
53
        $this->coverageError('foo');
54
    }
55
}
56