updated-packages

This commit is contained in:
RafficMohammed
2023-01-08 00:13:22 +05:30
parent 3ff7df7487
commit da241bacb6
12659 changed files with 563377 additions and 510538 deletions

View File

@@ -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());
}
}

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);