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

CodeBlockSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 20
rs 10
wmc 4
1
<?php
2
3
declare(strict_types=1);
4
5
namespace spec\hanneskod\readmetester\Utils;
6
7
use hanneskod\readmetester\Utils\CodeBlock;
8
use PhpSpec\ObjectBehavior;
9
use Prophecy\Argument;
10
11
class CodeBlockSpec extends ObjectBehavior
12
{
13
    function let()
14
    {
15
        $this->beConstructedWith('foo');
16
    }
17
18
    function it_is_initializable()
19
    {
20
        $this->shouldHaveType(CodeBlock::class);
21
    }
22
23
    function it_contains_code()
24
    {
25
        $this->getCode()->shouldReturn('foo');
26
    }
27
28
    function it_can_prepend_code()
29
    {
30
        $this->prepend(new CodeBlock('bar:'))->shouldBeLike(new CodeBlock('bar:foo'));
31
    }
32
33
    function it_can_append_code()
34
    {
35
        $this->append(new CodeBlock(':bar'))->shouldBeLike(new CodeBlock('foo:bar'));
36
    }
37
}
38