Skip to content

Commit 9f96a9f

Browse files
committed
Add missing tests
1 parent b9d1e48 commit 9f96a9f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

tests/unit/DocBlock/Tags/MethodTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,19 @@ public function testStringRepresentationIsReturnedWithoutDescription(): void
225225
);
226226
}
227227

228+
/**
229+
* @covers ::__construct
230+
* @covers ::getReturnType
231+
*/
232+
public function testReturnsReference(): void
233+
{
234+
$expected = new String_();
235+
236+
$fixture = new Method('myMethod', [], $expected);
237+
238+
$this->assertFalse($fixture->returnsReference());
239+
}
240+
228241
/**
229242
* @covers ::create
230243
*/

tests/unit/DocBlock/Tags/ParamTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,19 @@ public function testStringRepresentationIsReturned(): void
153153

154154
$this->assertSame('string ...$myParameter Description', (string) $fixture);
155155
}
156+
157+
/**
158+
* @uses \phpDocumentor\Reflection\DocBlock\Description
159+
*
160+
* @covers ::__construct
161+
* @covers \phpDocumentor\Reflection\DocBlock\Tags\Param::isReference
162+
*/
163+
public function testIsReference(): void
164+
{
165+
$expected = new Description('Description');
166+
167+
$fixture = new Param('1.0', null, false, $expected);
168+
169+
$this->assertFalse($fixture->isReference());
170+
}
156171
}

0 commit comments

Comments
 (0)