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

ArrayObjectLineTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanBeCreated() 0 7 1
A testCanReturnTheContent() 0 4 1
1
<?php
2
3
namespace Test\DiTesto;
4
5
use LazyEight\DiTesto\ArrayObjectLine;
6
use PHPUnit\Framework\TestCase;
7
8
class ArrayObjectLineTest extends TestCase
9
{
10
    protected $textToTest = 'the possibility that there are detectable and measurable patterns that indicate the';
11
12
    /**
13
     * @covers \LazyEight\DiTesto\ArrayObjectLine::__construct
14
     * @uses \LazyEight\DiTesto\ArrayObjectLine
15
     * @return \LazyEight\DiTesto\ArrayObjectLine
16
     */
17
    public function testCanBeCreated()
18
    {
19
        $instance = new ArrayObjectLine([$this->textToTest]);
20
        $this->assertInstanceOf(ArrayObjectLine::class, $instance);
21
22
        return $instance;
23
    }
24
25
    /**
26
     * @covers \LazyEight\DiTesto\ArrayObjectLine::getRawContent
27
     * @depends testCanBeCreated
28
     */
29
    public function testCanReturnTheContent(ArrayObjectLine $arrayObjectLine)
30
    {
31
        $this->assertEquals($this->textToTest, $arrayObjectLine->getRawContent());
32
    }
33
}
34