Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit d8086fa

Browse files
committed
Add deprecated DocComment tag for setAttribs
1 parent 3741bfb commit d8086fa

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Helper/Gravatar.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ public function getImgTag()
183183
*
184184
* @param array $attribs
185185
* @return Gravatar
186+
*
187+
* @deprecated Please use Zend\View\Helper\Gravatar::setAttributes
186188
*/
187189
public function setAttribs(array $attribs)
188190
{

test/Helper/GravatarTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use PHPUnit\Framework\Error\Deprecated as DeprecatedError;
1313
use PHPUnit\Framework\TestCase;
14+
use ReflectionMethod;
1415
use Zend\View\Exception;
1516
use Zend\View\Helper\Gravatar;
1617
use Zend\View\Renderer\PhpRenderer as View;
@@ -293,4 +294,12 @@ public function testSetAttribsIsDeprecated()
293294

294295
$this->helper->setAttribs([]);
295296
}
297+
298+
public function testSetAttribsDocCommentHasDeprecated()
299+
{
300+
$method = new ReflectionMethod($this->helper, 'setAttribs');
301+
$comment = $method->getDocComment();
302+
303+
$this->assertContains('@deprecated', $comment);
304+
}
296305
}

0 commit comments

Comments
 (0)