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

VerbSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 24
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_detects_voiding_verbs() 0 5 1
A its_properties_can_be_read() 0 7 1
A it_creates_voiding_verb_through_factory_method() 0 7 1
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