Completed
Pull Request — develop (#89)
by Jaap
02:41
created

CreateCommandTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4
Metric Value
wmc 3
lcom 1
cbo 4
dl 0
loc 36
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A testGetFile() 0 4 1
A testGetStrategies() 0 4 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-2015 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\Reflection\Php\Factory\File;
14
15
16
use phpDocumentor\Reflection\File\LocalFile;
17
use phpDocumentor\Reflection\Php\ProjectFactoryStrategies;
18
19
/**
20
 * @coversDefaultClass phpDocumentor\Reflection\Php\Factory\File\CreateCommand
21
 * @covers ::__construct
22
 * @uses phpDocumentor\Reflection\File\LocalFile
23
 * @uses phpDocumentor\Reflection\Php\ProjectFactoryStrategies
24
 */
25
class CreateCommandTest extends \PHPUnit_Framework_TestCase
26
{
27
    /**
28
     * @var CreateCommand
29
     */
30
    private $fixture;
31
32
    /** @var LocalFile */
33
    private $file;
34
35
    /** @var ProjectFactoryStrategies */
36
    private $strategies;
37
38
    protected function setUp()
39
    {
40
        $this->file = new LocalFile(__FILE__);
41
        $this->strategies = new ProjectFactoryStrategies([]);
42
        $this->fixture = new CreateCommand($this->file, $this->strategies);
43
    }
44
45
    /**
46
     * @covers ::getFile
47
     */
48
    public function testGetFile()
49
    {
50
        $this->assertSame($this->file, $this->fixture->getFile());
51
    }
52
53
    /**
54
     * @covers ::getStrategies
55
     */
56
    public function testGetStrategies()
57
    {
58
        $this->assertSame($this->strategies, $this->fixture->getStrategies());
59
    }
60
}
61