Completed
Push — master ( 4700f8...b32d7e )
by Tomasz
02:09
created

UtilityTest::testRootElementAliasNotFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

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 4
nc 1
nop 0
1
<?php
2
namespace Thunder\Serializard\Tests;
3
4
use Thunder\Serializard\Utility\RootElementProviderUtility;
5
6
/**
7
 * @author Tomasz Kowalczyk <[email protected]>
8
 */
9
final class UtilityTest extends AbstractTestCase
10
{
11
    public function testInvalidKey()
12
    {
13
        $this->expectException('InvalidArgumentException');
14
        new RootElementProviderUtility([0 => 'Class']);
15
    }
16
17
    public function testInvalidValue()
18
    {
19
        $this->expectException('InvalidArgumentException');
20
        new RootElementProviderUtility(['Class' => 0]);
21
    }
22
23
    public function testRootElementAliasNotFound()
24
    {
25
        $utility = new RootElementProviderUtility([]);
26
        $this->expectException('RuntimeException');
27
        $utility('invalid');
28
    }
29
}
30