Skip to content

Commit 9d37c2e

Browse files
Allow testing this component with PHPUnit 8
1 parent 1b6b9fb commit 9d37c2e

File tree

5 files changed

+3
-25
lines changed

5 files changed

+3
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
/composer.lock
33
/vendor
44
/.php_cs.cache
5+
/.phpunit.result.cache
56
/from.txt.orig

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"php": "^7.1"
1919
},
2020
"require-dev": {
21-
"phpunit/phpunit": "^7.0",
21+
"phpunit/phpunit": "^7.5 || ^8.0",
2222
"symfony/process": "^2 || ^3.3 || ^4"
2323
},
2424
"autoload": {

tests/DifferTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -426,24 +426,6 @@ public function provideSplitStringByLinesCases(): array
426426
];
427427
}
428428

429-
public function testConstructorNull(): void
430-
{
431-
$this->assertAttributeInstanceOf(
432-
UnifiedDiffOutputBuilder::class,
433-
'outputBuilder',
434-
new Differ(null)
435-
);
436-
}
437-
438-
public function testConstructorString(): void
439-
{
440-
$this->assertAttributeInstanceOf(
441-
UnifiedDiffOutputBuilder::class,
442-
'outputBuilder',
443-
new Differ("--- Original\n+++ New\n")
444-
);
445-
}
446-
447429
public function testConstructorInvalidArgInt(): void
448430
{
449431
$this->expectException(InvalidArgumentException::class);

tests/LongestCommonSubsequenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function testStrictTypeCalculate(): void
190190
{
191191
$diff = $this->implementation->calculate(['5'], ['05']);
192192

193-
$this->assertInternalType('array', $diff);
193+
$this->assertIsArray($diff);
194194
$this->assertCount(0, $diff);
195195
}
196196

tests/ParserTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ public function testParse(): void
3838

3939
$diffs = $this->parser->parse($content);
4040

41-
$this->assertInternalType('array', $diffs);
4241
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
4342
$this->assertCount(1, $diffs);
4443

4544
$chunks = $diffs[0]->getChunks();
46-
$this->assertInternalType('array', $chunks);
4745
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
4846

4947
$this->assertCount(1, $chunks);
@@ -85,13 +83,11 @@ public function testParseWithRemovedLines(): void
8583
-B
8684
END;
8785
$diffs = $this->parser->parse($content);
88-
$this->assertInternalType('array', $diffs);
8986
$this->assertContainsOnlyInstancesOf(Diff::class, $diffs);
9087
$this->assertCount(1, $diffs);
9188

9289
$chunks = $diffs[0]->getChunks();
9390

94-
$this->assertInternalType('array', $chunks);
9591
$this->assertContainsOnlyInstancesOf(Chunk::class, $chunks);
9692
$this->assertCount(1, $chunks);
9793

@@ -102,7 +98,6 @@ public function testParseWithRemovedLines(): void
10298
$this->assertSame(8, $chunk->getEndRange());
10399

104100
$lines = $chunk->getLines();
105-
$this->assertInternalType('array', $lines);
106101
$this->assertContainsOnlyInstancesOf(Line::class, $lines);
107102
$this->assertCount(2, $lines);
108103

0 commit comments

Comments
 (0)