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

AgentSpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 2
dl 0
loc 18
ccs 0
cts 13
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_an_actor() 0 6 1
A its_properties_can_be_read() 0 8 1
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