Passed
Push — master ( a32b7c...9671df )
by Andy
02:16
created

RowTest::testRowIsTraversable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Palmtree\Csv\Test\Row;
4
5
use Palmtree\Csv\Reader;
6
use Palmtree\Csv\Row\Row;
7
use PHPUnit\Framework\TestCase;
8
9
class RowTest extends TestCase
10
{
11 View Code Duplication
    public function testRowArrayAccess()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
    {
13
        $reader = new Reader('php://memory', false);
14
15
        $row = new Row(['foo', 'bar'], $reader);
16
17
        $this->assertEquals('bar', $row[1]);
18
    }
19
20 View Code Duplication
    public function testRowCounting()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
    {
22
        $reader = new Reader('php://memory', false);
23
24
        $row = new Row(['foo', 'bar'], $reader);
25
26
        $this->assertCount(2, $row);
27
    }
28
29 View Code Duplication
    public function testRowIsTraversable()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
    {
31
        $reader = new Reader('php://memory', false);
32
33
        $row = new Row(['foo', 'bar'], $reader);
34
35
        $this->assertTrue(is_iterable($row));
36
    }
37
}
38