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

GroupSpec::its_properties_can_be_read()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 7

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 10
ccs 0
cts 9
cp 0
rs 9.4285
cc 1
eloc 7
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\Agent;
7
use Xabbuh\XApi\Model\InverseFunctionalIdentifier;
8
9
class GroupSpec extends ObjectBehavior
10
{
11
    function it_can_be_initialized_without_an_inverse_functional_identifier()
12
    {
13
        $this->beConstructedWith(null, 'anonymous group');
14
        $this->shouldBeAnInstanceOf('Xabbuh\XApi\Model\Group');
15
    }
16
17
    function it_is_an_actor()
18
    {
19
        $this->beConstructedWith(null, 'test');
20
        $this->shouldHaveType('Xabbuh\XApi\Model\Actor');
21
    }
22
23
    function its_properties_can_be_read()
24
    {
25
        $iri = InverseFunctionalIdentifier::withMbox('mailto:[email protected]');
26
        $members = array(new Agent(InverseFunctionalIdentifier::withMbox('mailto:[email protected]')));
27
        $this->beConstructedWith($iri, 'test', $members);
28
29
        $this->getInverseFunctionalIdentifier()->shouldReturn($iri);
30
        $this->getName()->shouldReturn('test');
31
        $this->getMembers()->shouldReturn($members);
32
    }
33
}
34