Completed
Push — master ( 90ccc1...22512f )
by Kamil
35:43
created

TwigMetadataProcessorSpec   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 4 1
A it_is_initializable() 0 4 1
A it_implements_Sylius_Metadata_Processor_interface() 0 4 1
A it_delegates_processing_directly_to_metadata() 0 6 1
1
<?php
2
3
namespace spec\Sylius\Component\Metadata\Processor;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Sylius\Component\Metadata\Model\MetadataInterface;
8
use Twig_Environment;
9
10
/**
11
 * @mixin \Sylius\Component\Metadata\Processor\TwigMetadataProcessor
12
 *
13
 * @author Kamil Kokot <[email protected]>
14
 */
15
class TwigMetadataProcessorSpec extends ObjectBehavior
16
{
17
    function let(Twig_Environment $twig)
18
    {
19
        $this->beConstructedWith($twig);
20
    }
21
22
    function it_is_initializable()
23
    {
24
        $this->shouldHaveType('Sylius\Component\Metadata\Processor\TwigMetadataProcessor');
25
    }
26
27
    function it_implements_Sylius_Metadata_Processor_interface()
28
    {
29
        $this->shouldImplement('Sylius\Component\Metadata\Processor\MetadataProcessorInterface');
30
    }
31
32
    function it_delegates_processing_directly_to_metadata(MetadataInterface $metadata)
33
    {
34
        $metadata->forAll(Argument::type('callable'))->shouldBeCalled();
35
36
        $this->process($metadata);
37
    }
38
}
39