Completed
Pull Request — master (#3)
by Christian
03:16
created

AgentSpec::it_is_an_actor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 0
cts 6
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
crap 2
1
<?php
2
3
namespace spec\Xabbuh\XApi\Model;
4
5
use PhpSpec\ObjectBehavior;
6
use Xabbuh\XApi\Model\InverseFunctionalIdentifier;
7
8
class AgentSpec extends ObjectBehavior
9
{
10
    function it_is_an_actor()
11
    {
12
        $iri = InverseFunctionalIdentifier::withMbox('mailto:[email protected]');
13
        $this->beConstructedWith($iri);
14
        $this->shouldHaveType('Xabbuh\XApi\Model\Actor');
15
    }
16
17
    function its_properties_can_be_read()
18
    {
19
        $iri = InverseFunctionalIdentifier::withMbox('mailto:[email protected]');
20
        $this->beConstructedWith($iri, 'test');
21
22
        $this->getInverseFunctionalIdentifier()->shouldReturn($iri);
23
        $this->getName()->shouldReturn('test');
24
    }
25
}
26