Completed
Push — master ( f2e7a7...9c404b )
by Victor
01:52
created

FileLocationTest::testCanBeCreated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: victor
5
 * Date: 10/04/16
6
 * Time: 01:40
7
 */
8
9
namespace Test\DiTesto;
10
11
12
use LazyEight\BasicTypes\Stringy;
13
use LazyEight\DiTesto\ValueObject\FileLocation;
14
15
class FileLocationTest extends \PHPUnit_Framework_TestCase
16
{
17
    /**
18
     * @var string
19
     */
20
    protected $file = './tests/files/urls.txt';
21
22
    /**
23
     * @covers \LazyEight\DiTesto\ValueObject\FileLocation::__construct
24
     * @uses \LazyEight\DiTesto\ValueObject\FileLocation
25
     * @return \LazyEight\DiTesto\ValueObject\FileLocation
26
     */
27
    public function testCanBeCreated()
28
    {
29
        $instance = new FileLocation(new Stringy($this->file));
30
        $this->assertInstanceOf(FileLocation::class, $instance);
31
        return $instance;
32
    }
33
34
    /**
35
     * @covers \LazyEight\DiTesto\ValueObject\FileLocation::getValue
36
     * @uses \LazyEight\DiTesto\ValueObject\FileLocation
37
     * @depends testCanBeCreated
38
     * @uses \LazyEight\DiTesto\ValueObject\FileLocation
39
     * @param \LazyEight\DiTesto\ValueObject\FileLocation
40
     */
41
    public function testValueCanBeRetrieved(FileLocation $location)
42
    {
43
        $this->assertEquals($location->getValue()->getValue(), $this->file);
44
    }
45
}
46