Completed
Push — master ( 0585c5...8e425f )
by Victor
13s
created

LineTest::testCanGetContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Test\DiTesto;
4
5
use LazyEight\DiTesto\Line;
6
use PHPUnit\Framework\TestCase;
7
8
class LineTest extends TestCase
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $textToTest = 'the possibility that there are detectable and measurable patterns that indicate the';
14
15
    /**
16
     * @covers \LazyEight\DiTesto\Line::__construct
17
     * @uses \LazyEight\DiTesto\Line
18
     * @return \LazyEight\DiTesto\Line
19
     */
20
    public function testCanBeCreated()
21
    {
22
        $instance = new Line($this->textToTest);
23
        $this->assertInstanceOf(Line::class, $instance);
24
25
        return $instance;
26
    }
27
28
    /**
29
     * @covers \LazyEight\DiTesto\Line::getContent
30
     * @covers \LazyEight\DiTesto\Line::__construct
31
     * @depends testCanBeCreated
32
     * @uses \LazyEight\DiTesto\TextFileReader
33
     */
34
    public function testCanGetContent(Line $line)
35
    {
36
        $this->assertEquals($this->textToTest, $line->getContent());
37
    }
38
39
    /**
40
     * @covers \LazyEight\DiTesto\Line::__toString
41
     * @covers \LazyEight\DiTesto\Line::__construct
42
     * @depends testCanBeCreated
43
     * @uses \LazyEight\DiTesto\TextFileReader
44
     */
45
    public function testCanToString(Line $line)
46
    {
47
        $this->assertEquals($this->textToTest, $line->__toString());
48
    }
49
}
50