Completed
Push — master ( 2bedd9...b42c0c )
by Christian
02:23
created

AgentSpec::it_is_not_equal_to_a_group()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the xAPI package.
5
 *
6
 * (c) Christian Flothmann <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace spec\Xabbuh\XApi\Model;
13
14
use PhpSpec\ObjectBehavior;
15
use Xabbuh\XApi\Model\Activity;
16
use Xabbuh\XApi\Model\Group;
17
use Xabbuh\XApi\Model\InverseFunctionalIdentifier;
18
19
class AgentSpec extends ObjectBehavior
20
{
21
    function it_is_an_actor()
22
    {
23
        $iri = InverseFunctionalIdentifier::withMbox('mailto:[email protected]');
24
        $this->beConstructedWith($iri);
25
        $this->shouldHaveType('Xabbuh\XApi\Model\Actor');
26
    }
27
28
    function its_properties_can_be_read()
29
    {
30
        $iri = InverseFunctionalIdentifier::withMbox('mailto:[email protected]');
31
        $this->beConstructedWith($iri, 'test');
32
33
        $this->getInverseFunctionalIdentifier()->shouldReturn($iri);
34
        $this->getName()->shouldReturn('test');
35
    }
36
37
    function it_is_not_equal_to_a_group()
38
    {
39
        $this->beConstructedWith(InverseFunctionalIdentifier::withMbox('mailto:[email protected]'));
40
41
        $this->equals(new Group(InverseFunctionalIdentifier::withMbox('mailto:[email protected]')))->shouldReturn(false);
42
    }
43
44
    function it_is_not_equal_to_an_activity()
45
    {
46
        $this->beConstructedWith(InverseFunctionalIdentifier::withMbox('mailto:[email protected]'));
47
48
        $this->equals(new Activity())->shouldReturn(false);
49
    }
50
}
51