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

RegistryTest::testHasKeyword()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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