Completed
Pull Request — master (#6)
by Chuck
02:02
created

IsHiddenTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 34
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 4 1
A testIfSpecificationIsSatisfied() 0 4 1
A testIfSpecificationIsNotSatisfied() 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 Flyfinder\Specification;
14
15
use PHPUnit\Framework\TestCase;
16
use Mockery as m;
17
18
/**
19
 * Test case for IsHidden
20
 * @coversDefaultClass Flyfinder\Specification\IsHidden
21
 */
22
class IsHiddenTest extends TestCase
23
{
24
    /** @var IsHidden */
25
    private $fixture;
26
27
    /**
28
     * Initializes the fixture for this test.
29
     */
30
    public function setUp()
31
    {
32
        $this->fixture = new IsHidden();
33
    }
34
35
    public function tearDown()
36
    {
37
        m::close();
38
    }
39
40
    /**
41
     * @covers ::isSatisfiedBy
42
     */
43
    public function testIfSpecificationIsSatisfied()
44
    {
45
        $this->assertTrue($this->fixture->isSatisfiedBy(['basename' => '.test']));
46
    }
47
48
    /**
49
     * @covers ::isSatisfiedBy
50
     */
51
    public function testIfSpecificationIsNotSatisfied()
52
    {
53
        $this->assertFalse($this->fixture->isSatisfiedBy(['basename' => 'test']));
54
    }
55
}
56