Completed
Push — master ( ad7785...403475 )
by Christian
03:36
created

StatementNormalizerSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 22
ccs 0
cts 16
cp 0
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_is_a_normalizer() 0 4 1
A it_is_a_denormalizer() 0 4 1
A it_supports_normalizing_statements() 0 4 1
A it_supports_denormalizing_statements() 0 4 1
1
<?php
2
3
namespace spec\Xabbuh\XApi\Serializer\Normalizer;
4
5
use PhpSpec\ObjectBehavior;
6
use Xabbuh\XApi\DataFixtures\StatementFixtures;
7
use XApi\Fixtures\Json\StatementJsonFixtures;
8
9
class StatementNormalizerSpec extends ObjectBehavior
10
{
11
    function it_is_a_normalizer()
12
    {
13
        $this->shouldHaveType('Symfony\Component\Serializer\Normalizer\NormalizerInterface');
14
    }
15
16
    function it_is_a_denormalizer()
17
    {
18
        $this->shouldHaveType('Symfony\Component\Serializer\Normalizer\DenormalizerInterface');
19
    }
20
21
    function it_supports_normalizing_statements()
22
    {
23
        $this->supportsNormalization(StatementFixtures::getMinimalStatement())->shouldBe(true);
24
    }
25
26
    function it_supports_denormalizing_statements()
27
    {
28
        $this->supportsDenormalization(StatementJsonFixtures::getMinimalStatement(), 'Xabbuh\XApi\Model\Statement')->shouldBe(true);
29
    }
30
}
31