This repository was archived by the owner on Jan 31, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,12 @@ public function getImgTag()
186
186
*/
187
187
public function setAttribs (array $ attribs )
188
188
{
189
+ trigger_error (sprintf (
190
+ '%s is deprecated; please use %s::setAttributes ' ,
191
+ __METHOD__ ,
192
+ __CLASS__
193
+ ), E_USER_DEPRECATED );
194
+
189
195
$ this ->attribs = $ attribs ;
190
196
return $ this ;
191
197
}
Original file line number Diff line number Diff line change 9
9
10
10
namespace ZendTest \View \Helper ;
11
11
12
+ use PHPUnit \Framework \Error \Deprecated as DeprecatedError ;
12
13
use PHPUnit \Framework \TestCase ;
13
14
use Zend \View \Exception ;
14
- use Zend \View \Renderer \PhpRenderer as View ;
15
15
use Zend \View \Helper \Gravatar ;
16
+ use Zend \View \Renderer \PhpRenderer as View ;
16
17
17
18
/**
18
19
* @group Zendview
@@ -285,4 +286,11 @@ public function testEmailIsProperlyNormalized()
285
286
$ this ->
helper ->
__invoke (
'[email protected] ' )->
getEmail ()
286
287
);
287
288
}
289
+
290
+ public function testSetAttribsIsDeprecated ()
291
+ {
292
+ $ this ->expectException (DeprecatedError::class);
293
+
294
+ $ this ->helper ->setAttribs ([]);
295
+ }
288
296
}
You can’t perform that action at this time.
0 commit comments