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

LocalFileTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 29
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetContents() 0 5 1
A testMd5() 0 5 1
A testPath() 0 5 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\File;
14
15
/**
16
 * @coversDefaultClass phpDocumentor\Reflection\File\LocalFile
17
 * @covers ::__construct
18
 */
19
class LocalFileTest extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @covers ::getContents
23
     */
24
    public function testGetContents()
25
    {
26
        $file = new LocalFile(__FILE__);
27
        $this->assertEquals(file_get_contents(__FILE__), $file->getContents());
28
    }
29
30
    /**
31
     * @covers ::md5
32
     */
33
    public function testMd5()
34
    {
35
        $file = new LocalFile(__FILE__);
36
        $this->assertEquals(md5_file(__FILE__), $file->md5());
37
    }
38
39
    /**
40
     * @covers ::path
41
     */
42
    public function testPath()
43
    {
44
        $file = new LocalFile(__FILE__);
45
        $this->assertEquals(__FILE__, $file->path());
46
    }
47
}
48