Skip to content

Commit fa4747c

Browse files
staabmsebastianbergmann
authored andcommitted
Cover ResultCacheId::fromReorderable() in tests
1 parent 0182206 commit fa4747c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/unit/Runner/ResultCache/ResultCacheIdTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PHPUnit\Framework\Attributes\CoversClass;
1616
use PHPUnit\Framework\Attributes\DataProvider;
1717
use PHPUnit\Framework\Attributes\Small;
18+
use PHPUnit\Framework\Reorderable;
1819
use PHPUnit\Framework\TestCase;
1920
use PHPUnit\Metadata\MetadataCollection;
2021

@@ -35,6 +36,14 @@ public function testResultCacheId($expectedString, ResultCacheId $cacheId): void
3536
$this->assertSame($expectedString, $cacheId->asString());
3637
}
3738

39+
public function testReorderableResultCacheId(): void
40+
{
41+
$reorderable = $this;
42+
$this->assertInstanceOf(Reorderable::class, $reorderable);
43+
44+
$this->assertSame('PHPUnit\Runner\ResultCache\ResultCacheIdTest::testReorderableResultCacheId', ResultCacheId::fromReorderable($reorderable)->asString());
45+
}
46+
3847
private static function testMethod(): TestMethod
3948
{
4049
return new TestMethod(

0 commit comments

Comments
 (0)