TestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 4 1
A testCreateThrowsException() 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-2018 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;
14
15
use Mockery as m;
16
use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
17
use phpDocumentor\Reflection\Php\StrategyContainer;
18
use PHPUnit\Framework\TestCase as BaseTestCase;
19
20
/**
21
 * Base test case for all strategies, to be sure that they check if the can handle objects before handeling them.
22
 */
23
abstract class TestCase extends BaseTestCase
24
{
25
    /**
26
     * @var ProjectFactoryStrategy
27
     */
28
    protected $fixture;
29
30
    protected function tearDown()
31
    {
32
        m::close();
33
    }
34
35
    /**
36
     * @covers ::create
37
     *
38
     * @expectedException \InvalidArgumentException
39
     */
40
    public function testCreateThrowsException()
41
    {
42
        $this->fixture->create(new \stdClass(), m::mock(StrategyContainer::class));
43
    }
44
}
45