Skip to content

Commit 2326ede

Browse files
committed
fix: use onlyMethods() instead of setMethods()
setMethods() is deprecated.
1 parent fca1ac4 commit 2326ede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TestDouble.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ trait TestDouble
2121
*
2222
* $email = $this->getMockBuilder('CI_Email')
2323
* ->disableOriginalConstructor()
24-
* ->setMethods(['send'])
24+
* ->onlyMethods(['send'])
2525
* ->getMock();
2626
* $email->method('send')->willReturn(true);
2727
*
@@ -67,7 +67,7 @@ public function getDouble(
6767
}
6868
}
6969

70-
$mock = $mockBuilder->setMethods($methods)->getMock();
70+
$mock = $mockBuilder->onlyMethods($methods)->getMock();
7171

7272
foreach ($onConsecutiveCalls as $method => $returns) {
7373
$mock->expects($this->any())->method($method)

0 commit comments

Comments
 (0)