File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ public function test_lock_autorelease() {
172172 * @throws coding_exception
173173 */
174174 public function test_lock_timeout () {
175- $ mockbuilder = $ this ->getMockBuilder ('Redis ' )->setMethods (array ('setnx ' ))->disableOriginalConstructor ();
175+ $ mockbuilder = $ this ->getMockBuilder ('Redis ' )->onlyMethods (array ('setnx ' ))->disableOriginalConstructor ();
176176 $ redis = $ mockbuilder ->getMock ();
177177
178178 $ redislockfactory = new \local_redislock \lock \redis_lock_factory ('cron ' , $ redis );
@@ -193,7 +193,7 @@ public function test_lock_timeout() {
193193 * @throws coding_exception
194194 */
195195 public function test_lock_zero_timeout () {
196- $ redis = $ this ->getMockBuilder ('Redis ' )->setMethods (array ('setnx ' ))->disableOriginalConstructor ()->getMock ();
196+ $ redis = $ this ->getMockBuilder ('Redis ' )->onlyMethods (array ('setnx ' ))->disableOriginalConstructor ()->getMock ();
197197 $ redis ->expects ($ this ->once ())->method ('setnx ' )->will ($ this ->returnValue (false ));
198198
199199 $ factory = new \local_redislock \lock \redis_lock_factory ('cron ' , $ redis );
You can’t perform that action at this time.
0 commit comments