Failed Conditions
Branch ignore-unknown-keywords (efa676)
by Stéphane
02:58
created

RegistryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetConstraintsThrowOnUnsupportedVersion() 0 5 1
A testHasKeyword() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the JVal package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace JVal;
11
12
class RegistryTest extends \PHPUnit_Framework_TestCase
13
{
14
    /**
15
     * @expectedException \JVal\Exception\UnsupportedVersionException
16
     */
17
    public function testGetConstraintsThrowOnUnsupportedVersion()
18
    {
19
        $registry = new Registry();
20
        $registry->getConstraints('unknown');
21
    }
22
23
    public function testHasKeyword()
24
    {
25
        $registry = new Registry();
26
        $this->assertFalse($registry->hasKeyword(Registry::VERSION_CURRENT, 'unknown'));
27
        $this->assertTrue($registry->hasKeyword(Registry::VERSION_CURRENT, 'maximum'));
28
    }
29
}
30