Completed
Pull Request — master (#5)
by Christian
03:36
created

ActorNormalizerSpec   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_a_normalizer() 0 4 1
A it_is_a_denormalizer() 0 4 1
A it_requires_an_iri_when_denormalizing_an_agent() 0 10 1
1
<?php
2
3
namespace spec\Xabbuh\XApi\Serializer\Normalizer;
4
5
use PhpSpec\ObjectBehavior;
6
7
class ActorNormalizerSpec extends ObjectBehavior
8
{
9
    function it_is_a_normalizer()
10
    {
11
        $this->shouldHaveType('Symfony\Component\Serializer\Normalizer\NormalizerInterface');
12
    }
13
14
    function it_is_a_denormalizer()
15
    {
16
        $this->shouldHaveType('Symfony\Component\Serializer\Normalizer\DenormalizerInterface');
17
    }
18
19
    function it_requires_an_iri_when_denormalizing_an_agent()
20
    {
21
        $this
22
            ->shouldThrow('\Symfony\Component\Serializer\Exception\InvalidArgumentException')
23
            ->during('denormalize', array(
24
                array('objectType' => 'Agent'),
25
                'Xabbuh\XApi\Model\Actor',
26
            ))
27
        ;
28
    }
29
}
30