ValueTests   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A newDefaultTestedInstance() 0 4 1
A testApply() 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\Selector\Tests\Units;
11
12
/**
13
 * Value Tests class.
14
 *
15
 * @author Ivannis Suárez Jerez <[email protected]>
16
 */
17
class ValueTests extends SelectorTestCase
18
{
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function newDefaultTestedInstance()
23
    {
24
        return $this->newTestedInstance(5);
25
    }
26
27
    /**
28
     * Test apply.
29
     */
30
    public function testApply()
31
    {
32
        $this
33
            /* @var \Cubiche\Core\Selector\Value $value */
34
            ->given($value = $this->newTestedInstance(5))
35
            ->then()
36
                ->integer($value->value())
37
                    ->isEqualTo(5)
38
                ->integer($value->value())
39
                    ->isEqualTo($value->apply(null))
40
        ;
41
    }
42
}
43