Skip to content

Commit 28b44ea

Browse files
authored
Merge pull request #19 from aivis/fix-v2-tests
fix TestFileReaderTest tests
2 parents 8635dba + 097ca3f commit 28b44ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/TestFileReaderTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public function testCodeReader()
1414

1515
$result = $encoder->getCode('TestFile.txt', 5, 0);
1616

17-
$this->assertTrue(isset($result[5]));
18-
$this->assertSame('Line 4', $result[5]);
17+
$this->assertTrue(isset($result[0]['code']));
18+
$this->assertSame('Line 4', $result[0]['code']);
1919
}
2020

2121
public function testCodeReaderLinesAround()
@@ -28,9 +28,9 @@ public function testCodeReaderLinesAround()
2828

2929
$result = $encoder->getCode('TestFile.txt', 5, 2);
3030

31-
foreach($result as $key => $value)
31+
foreach($result as $value)
3232
{
33-
$this->assertSame('Line ' . ($key - 1), $value);
33+
$this->assertSame('Line ' . ($value['line'] - 1), $value['code']);
3434
}
3535
}
3636
}

0 commit comments

Comments
 (0)