Passed
Push — master ( 3d4557...4c2a8d )
by Hannes
01:54
created

ErrorOutcomeSpec   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 7
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\hanneskod\readmetester\Runner;
6
7
use hanneskod\readmetester\Runner\ErrorOutcome;
8
use hanneskod\readmetester\Runner\OutcomeInterface;
9
use hanneskod\readmetester\Example\ExampleObj;
10
use PhpSpec\ObjectBehavior;
11
use Prophecy\Argument;
12
13
class ErrorOutcomeSpec extends ObjectBehavior
14
{
15
    function let(ExampleObj $example)
16
    {
17
        $this->beConstructedWith($example, 'foobar');
18
    }
19
20
    function it_is_initializable()
21
    {
22
        $this->shouldHaveType(ErrorOutcome::class);
23
    }
24
25
    function it_is_an_outcome()
26
    {
27
        $this->shouldHaveType(OutcomeInterface::class);
28
    }
29
30
    function it_contains_example($example)
31
    {
32
        $this->getExample()->shouldReturn($example);
33
    }
34
35
    function it_knows_its_type()
36
    {
37
        $this->shouldBeError();
38
        $this->shouldNotBeOutput();
39
        $this->shouldNotBeSkipped();
40
        $this->shouldNotBeVoid();
41
    }
42
43
    function it_must_be_handled()
44
    {
45
        $this->mustBeHandled()->shouldReturn(true);
46
    }
47
48
    function it_contains_content()
49
    {
50
        $this->getContent()->shouldReturn('foobar');
51
    }
52
}
53