diff --git a/tests/Fixtures/Php81TestClass.php b/tests/Fixtures/Php81TestClass.php index 455ec0e8f..a052ec443 100644 --- a/tests/Fixtures/Php81TestClass.php +++ b/tests/Fixtures/Php81TestClass.php @@ -8,12 +8,14 @@ class Php81TestClass { public readonly string $a; - private readonly string $b; + protected readonly string $b; + private readonly string $c; public function __construct(string $a) { $this->a = $a; $this->b = $a.$a; + $this->c = $a.$a.$a; } public function typeHints(X & Y $p1) diff --git a/tests/Parser/ParserTest.php b/tests/Parser/ParserTest.php index 570d5b8ae..f2c06d883 100644 --- a/tests/Parser/ParserTest.php +++ b/tests/Parser/ParserTest.php @@ -491,6 +491,9 @@ public function testParseObjectIncomplete() $this->assertSame('test', $val[1]->value->contents); } + /** + * @covers \Kint\Parser\Parser::parseObject + */ public function testParseObjectReadonly() { if (!KINT_PHP81) { @@ -511,6 +514,8 @@ public function testParseObjectReadonly() $this->assertTrue($val[0]->readonly); $this->assertSame('b', $val[1]->name); $this->assertTrue($val[1]->readonly); + $this->assertSame('c', $val[2]->name); + $this->assertTrue($val[2]->readonly); } /**