SelectorFactoryTests   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 13 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
use Cubiche\Core\Selector\Key;
13
14
/**
15
 * Selector Factory Tests Class.
16
 *
17
 * @author Karel Osorio Ramírez <[email protected]>
18
 */
19
class SelectorFactoryTests extends SelectorFactoryInterfaceTestCase
20
{
21
    /**
22
     * Test __construct.
23
     */
24
    public function testConstruct()
25
    {
26
        $this
27
            /* @var \Cubiche\Core\Selector\SelectorFactoryInterface $factory */
28
            ->given($factory = $this->newTestedInstance('Cubiche\Core\Selector'))
29
            ->then()
30
                /* @var \Cubiche\Core\Selector\Key $key */
31
                ->object($key = $factory->create('key', array('foo')))
32
                    ->isInstanceOf(Key::class)
33
                ->string($key->name())
34
                    ->isEqualto('foo')
35
        ;
36
    }
37
}
38