it_can_be_constructed_with_observers()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace spec\RMiller\BehatSpec\Extension\ErrorExtension\Observer;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use RMiller\BehatSpec\Extension\ErrorExtension\Observer\ErrorObserver;
8
9
class ErrorObserversSpec extends ObjectBehavior
10
{
11
    function it_can_only_be_constructed_with_observers()
12
    {
13
        $this->shouldThrow('\InvalidArgumentException')->during('__construct', [[new \stdClass()]]);
14
    }
15
16
    function it_can_be_constructed_with_observers(ErrorObserver $observer)
17
    {
18
        $this->beConstructedWith([$observer]);
19
    }
20
21
    function it_is_traversable()
22
    {
23
        $this->shouldHaveType('\Traversable');
24
    }
25
}
26