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

ContextRegistrySpec::it_stores_class_by_id()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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