Skip to content

Commit d409693

Browse files
Improve test
1 parent 6906fbe commit d409693

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tests/ChunkTest.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ protected function setUp(): void
2727
$this->chunk = new Chunk;
2828
}
2929

30+
public function testHasInitiallyNoLines(): void
31+
{
32+
$this->assertSame([], $this->chunk->getLines());
33+
}
34+
3035
public function testCanBeCreatedWithoutArguments(): void
3136
{
3237
$this->assertInstanceOf(Chunk::class, $this->chunk);
@@ -59,10 +64,10 @@ public function testLinesCanBeRetrieved(): void
5964

6065
public function testLinesCanBeSet(): void
6166
{
62-
$this->assertSame([], $this->chunk->getLines());
67+
$lines = [new Line(Line::ADDED, 'added'), new Line(Line::REMOVED, 'removed')];
68+
69+
$this->chunk->setLines($lines);
6370

64-
$testValue = ['line0', 'line1'];
65-
$this->chunk->setLines($testValue);
66-
$this->assertSame($testValue, $this->chunk->getLines());
71+
$this->assertSame($lines, $this->chunk->getLines());
6772
}
6873
}

0 commit comments

Comments
 (0)