Skip to content

Commit 1e9e740

Browse files
committed
INT-17537: Fix PHPUnit 9.5 deprecations
1 parent dd637db commit 1e9e740

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/redis_lock_factory_test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

0 commit comments

Comments
 (0)