From 9f96a9ff69e407f72d21b898ec54ab78101f3ab3 Mon Sep 17 00:00:00 2001 From: Jaapio Date: Sun, 4 Jan 2026 16:26:03 +0100 Subject: [PATCH] Add missing tests --- tests/unit/DocBlock/Tags/MethodTest.php | 13 +++++++++++++ tests/unit/DocBlock/Tags/ParamTest.php | 15 +++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/tests/unit/DocBlock/Tags/MethodTest.php b/tests/unit/DocBlock/Tags/MethodTest.php index c80b817..2cdf842 100644 --- a/tests/unit/DocBlock/Tags/MethodTest.php +++ b/tests/unit/DocBlock/Tags/MethodTest.php @@ -225,6 +225,19 @@ class MethodTest extends TestCase ); } + /** + * @covers ::__construct + * @covers ::getReturnType + */ + public function testReturnsReference(): void + { + $expected = new String_(); + + $fixture = new Method('myMethod', [], $expected); + + $this->assertFalse($fixture->returnsReference()); + } + /** * @covers ::create */ diff --git a/tests/unit/DocBlock/Tags/ParamTest.php b/tests/unit/DocBlock/Tags/ParamTest.php index 1a628f7..c89df39 100644 --- a/tests/unit/DocBlock/Tags/ParamTest.php +++ b/tests/unit/DocBlock/Tags/ParamTest.php @@ -153,4 +153,19 @@ class ParamTest extends TestCase $this->assertSame('string ...$myParameter Description', (string) $fixture); } + + /** + * @uses \phpDocumentor\Reflection\DocBlock\Description + * + * @covers ::__construct + * @covers \phpDocumentor\Reflection\DocBlock\Tags\Param::isReference + */ + public function testIsReference(): void + { + $expected = new Description('Description'); + + $fixture = new Param('1.0', null, false, $expected); + + $this->assertFalse($fixture->isReference()); + } }