Completed
Push — master ( 531aca...edc713 )
by Kamil
04:19
created

ContextRegistrySpec   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_stores_class_by_id() 0 6 1
A it_throws_an_exception_if_trying_to_get_class_by_unexisting_id() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ContextServiceExtension package.
5
 *
6
 * (c) FriendsOfBehat
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace spec\FriendsOfBehat\ContextServiceExtension\Context;
13
14
use PhpSpec\ObjectBehavior;
15
16
final class ContextRegistrySpec extends ObjectBehavior
17
{
18
    function it_stores_class_by_id()
19
    {
20
        $this->add('context_id', 'context_class');
21
22
        $this->getClass('context_id')->shouldReturn('context_class');
23
    }
24
25
    function it_throws_an_exception_if_trying_to_get_class_by_unexisting_id()
26
    {
27
        $this->shouldThrow(\InvalidArgumentException::class)->during('getClass', ['context_id']);
28
    }
29
}
30