Completed
Push — develop ( fbdd82...317691 )
by Mike
09:29
created

DefinitionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A itRegistersTheNameTypeFiltersAndPropertiesToConstructAReadModel() 0 14 1
1
<?php
2
/**
3
 * This file is part of phpDocumentor.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 *
8
 * @copyright 2010-2016 Mike van Riel<[email protected]>
9
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
10
 * @link      http://phpdoc.org
11
 */
12
13
namespace phpDocumentor\DomainModel\ReadModel;
14
15
/**
16
 * @coversDefaultClass phpDocumentor\DomainModel\ReadModel\Definition
17
 * @covers ::<private>
18
 */
19
final class DefinitionTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @test
23
     * @covers ::__construct
24
     * @covers ::getName
25
     * @covers ::getType
26
     * @covers ::getFilters
27
     * @covers ::getProperties
28
     */
29
    public function itRegistersTheNameTypeFiltersAndPropertiesToConstructAReadModel()
30
    {
31
        $name = 'name';
32
        $type = new Type('all');
33
        $filters = ['filter'];
34
        $properties = ['property'];
35
36
        $definition = new Definition($name, $type, $filters, $properties);
37
38
        $this->assertSame($name, $definition->getName());
39
        $this->assertSame($type, $definition->getType());
40
        $this->assertSame($filters, $definition->getFilters());
41
        $this->assertSame($properties, $definition->getProperties());
42
    }
43
}
44