QuantifierTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testClass() 0 7 1
A testSelectorSpecification() 0 12 1
1
<?php
2
/**
3
 * This file is part of the Cubiche package.
4
 *
5
 * Copyright (c) Cubiche
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace Cubiche\Core\Specification\Tests\Units\Quantifier;
11
12
use Cubiche\Core\Selector\SelectorInterface;
13
use Cubiche\Core\Specification\Quantifier\Quantifier;
14
use Cubiche\Core\Specification\SpecificationInterface;
15
use Cubiche\Core\Specification\Tests\Units\SpecificationTestCase;
16
17
/**
18
 * Quantifier Test Case Class.
19
 *
20
 * @author Ivannis Suárez Jerez <[email protected]>
21
 * @author Karel Osorio Ramírez <[email protected]>
22
 */
23
abstract class QuantifierTestCase extends SpecificationTestCase
24
{
25
    /**
26
     * Test class.
27
     */
28
    public function testClass()
29
    {
30
        $this
31
            ->testedClass
32
                ->isSubClassOf(Quantifier::class)
33
        ;
34
    }
35
36
    /**
37
     * Test selector.
38
     */
39
    public function testSelectorSpecification()
40
    {
41
        $this
42
            /* @var \Cubiche\Core\Specification\Quantifier\Quantifier $quantifier */
43
            ->given($quantifier = $this->newDefaultTestedInstance())
44
            ->then()
45
                ->object($quantifier->selector())
46
                    ->isInstanceOf(SelectorInterface::class)
47
                ->object($quantifier->specification())
48
                    ->isInstanceOf(SpecificationInterface::class)
49
        ;
50
    }
51
}
52