Completed
Branch master (3247f7)
by Christian
02:24
created

VerbSpec::it_detects_voiding_verbs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace spec\Xabbuh\XApi\Model;
4
5
use PhpSpec\ObjectBehavior;
6
7
class VerbSpec extends ObjectBehavior
8
{
9
    function it_detects_voiding_verbs()
10
    {
11
        $this->beConstructedWith('http://adlnet.gov/expapi/verbs/voided');
12
        $this->isVoidVerb()->shouldReturn(true);
13
    }
14
15
    function its_properties_can_be_read()
16
    {
17
        $this->beConstructedWith('http://tincanapi.com/conformancetest/verbid', array('en-US' => 'test'));
18
19
        $this->getId()->shouldReturn('http://tincanapi.com/conformancetest/verbid');
20
        $this->getDisplay()->shouldReturn(array('en-US' => 'test'));
21
    }
22
23
    function it_creates_voiding_verb_through_factory_method()
24
    {
25
        $this->beConstructedThrough(array('Xabbuh\XApi\Model\Verb', 'createVoidVerb'));
26
27
        $this->shouldHaveType('Xabbuh\XApi\Model\Verb');
28
        $this->getId()->shouldReturn('http://adlnet.gov/expapi/verbs/voided');
29
    }
30
}
31