updated-packages
This commit is contained in:
13
vendor/sebastian/diff/tests/ChunkTest.php
vendored
13
vendor/sebastian/diff/tests/ChunkTest.php
vendored
@@ -27,6 +27,11 @@ final class ChunkTest extends TestCase
|
||||
$this->chunk = new Chunk;
|
||||
}
|
||||
|
||||
public function testHasInitiallyNoLines(): void
|
||||
{
|
||||
$this->assertSame([], $this->chunk->getLines());
|
||||
}
|
||||
|
||||
public function testCanBeCreatedWithoutArguments(): void
|
||||
{
|
||||
$this->assertInstanceOf(Chunk::class, $this->chunk);
|
||||
@@ -59,10 +64,10 @@ final class ChunkTest extends TestCase
|
||||
|
||||
public function testLinesCanBeSet(): void
|
||||
{
|
||||
$this->assertSame([], $this->chunk->getLines());
|
||||
$lines = [new Line(Line::ADDED, 'added'), new Line(Line::REMOVED, 'removed')];
|
||||
|
||||
$testValue = ['line0', 'line1'];
|
||||
$this->chunk->setLines($testValue);
|
||||
$this->assertSame($testValue, $this->chunk->getLines());
|
||||
$this->chunk->setLines($lines);
|
||||
|
||||
$this->assertSame($lines, $this->chunk->getLines());
|
||||
}
|
||||
}
|
||||
|
||||
18
vendor/sebastian/diff/tests/DifferTest.php
vendored
18
vendor/sebastian/diff/tests/DifferTest.php
vendored
@@ -426,24 +426,6 @@ EOF
|
||||
];
|
||||
}
|
||||
|
||||
public function testConstructorNull(): void
|
||||
{
|
||||
$this->assertAttributeInstanceOf(
|
||||
UnifiedDiffOutputBuilder::class,
|
||||
'outputBuilder',
|
||||
new Differ(null)
|
||||
);
|
||||
}
|
||||
|
||||
public function testConstructorString(): void
|
||||
{
|
||||
$this->assertAttributeInstanceOf(
|
||||
UnifiedDiffOutputBuilder::class,
|
||||
'outputBuilder',
|
||||
new Differ("--- Original\n+++ New\n")
|
||||
);
|
||||
}
|
||||
|
||||
public function testConstructorInvalidArgInt(): void
|
||||
{
|
||||
$this->expectException(InvalidArgumentException::class);
|
||||
|
||||
@@ -190,7 +190,7 @@ abstract class LongestCommonSubsequenceTest extends TestCase
|
||||
{
|
||||
$diff = $this->implementation->calculate(['5'], ['05']);
|
||||
|
||||
$this->assertInternalType('array', $diff);
|
||||
$this->assertIsArray($diff);
|
||||
$this->assertCount(0, $diff);
|
||||
}
|
||||
|
||||
|
||||
5
vendor/sebastian/diff/tests/ParserTest.php
vendored
5
vendor/sebastian/diff/tests/ParserTest.php
vendored
@@ -38,12 +38,10 @@ final class ParserTest extends TestCase
|
||||
|
||||
$diffs = $this->parser->parse($content);
|
||||
|
||||
$this->assertInternalType('array', $diffs);
|
||||
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
|
||||
$this->assertCount(1, $diffs);
|
||||
|
||||
$chunks = $diffs[0]->getChunks();
|
||||
$this->assertInternalType('array', $chunks);
|
||||
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
|
||||
|
||||
$this->assertCount(1, $chunks);
|
||||
@@ -85,13 +83,11 @@ index abcdefg..abcdefh 100644
|
||||
-B
|
||||
END;
|
||||
$diffs = $this->parser->parse($content);
|
||||
$this->assertInternalType('array', $diffs);
|
||||
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
|
||||
$this->assertCount(1, $diffs);
|
||||
|
||||
$chunks = $diffs[0]->getChunks();
|
||||
|
||||
$this->assertInternalType('array', $chunks);
|
||||
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
|
||||
$this->assertCount(1, $chunks);
|
||||
|
||||
@@ -102,7 +98,6 @@ END;
|
||||
$this->assertSame(8, $chunk->getEndRange());
|
||||
|
||||
$lines = $chunk->getLines();
|
||||
$this->assertInternalType('array', $lines);
|
||||
$this->assertContainsOnlyInstancesOf(Line::class, $lines);
|
||||
$this->assertCount(2, $lines);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user