Skip to content

Commit 1266c4d

Browse files
staabmsebastianbergmann
authored andcommitted
Test PHPT ResultCacheId
1 parent ab07345 commit 1266c4d

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
@@ -9,6 +9,7 @@
99
*/
1010
namespace PHPUnit\Runner\ResultCache;
1111

12+
use PHPUnit\Event\Code\Phpt;
1213
use PHPUnit\Event\Code\TestDox;
1314
use PHPUnit\Event\Code\TestMethod;
1415
use PHPUnit\Event\TestData\TestDataCollection;
@@ -44,6 +45,14 @@ public function testReorderableResultCacheId(): void
4445
$this->assertSame('PHPUnit\Runner\ResultCache\ResultCacheIdTest::testReorderableResultCacheId', ResultCacheId::fromReorderable($reorderable)->asString());
4546
}
4647

48+
public function testPhptResultCacheId(): void
49+
{
50+
$file = 'test.phpt';
51+
$phptTest = new Phpt($file);
52+
53+
$this->assertSame('test.phpt', ResultCacheId::fromTest($phptTest)->asString());
54+
}
55+
4756
private static function testMethod(): TestMethod
4857
{
4958
return new TestMethod(

0 commit comments

Comments
 (0)