Completed
Push — master ( a04aa9...a7d02a )
by Ivannis Suárez
02:48
created

FieldTestCase::testCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

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