FieldTestCase::testName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
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
use Cubiche\Core\Selector\Field;
13
14
/**
15
 * Field Test Case class.
16
 *
17
 * @author Ivannis Suárez Jerez <[email protected]>
18
 */
19
abstract class FieldTestCase extends SelectorTestCase
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function newDefaultTestedInstance()
25
    {
26
        return $this->newTestedInstance('foo');
27
    }
28
29
    /**
30
     * Test name.
31
     */
32
    public function testName()
33
    {
34
        $this
35
            /* @var \Cubiche\Core\Selector\Field $field */
36
            ->given($field = $this->newTestedInstance('foo'))
37
            ->then()
38
                ->string($field->name())
39
                    ->isEqualTo('foo')
40
        ;
41
    }
42
}
43