Skip to content

Commit 915e907

Browse files
committed
Use back setMethods because of phpunit on PHP 7.1
Ref: 3488f37 Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 173a373 commit 915e907

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/Utils/CLITest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class CLITest extends TestCase
1919
*/
2020
private function getCLI($getopt)
2121
{
22-
$cli = $this->getMockBuilder(CLI::class)->onlyMethods(['getopt'])->getMock();
22+
$cli = $this->getMockBuilder(CLI::class)->setMethods(['getopt'])->getMock();
2323
$cli->method('getopt')->willReturn($getopt);
2424

2525
return $cli;
@@ -33,7 +33,7 @@ private function getCLI($getopt)
3333
*/
3434
private function getCLIStdIn($input, $getopt)
3535
{
36-
$cli = $this->getMockBuilder(CLI::class)->onlyMethods(['getopt', 'readStdin'])->getMock();
36+
$cli = $this->getMockBuilder(CLI::class)->setMethods(['getopt', 'readStdin'])->getMock();
3737
$cli->method('getopt')->willReturn($getopt);
3838
$cli->method('readStdin')->willReturn($input);
3939

tests/Utils/FormatterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function testMergeFormats($default, $overriding, $expected)
2121
{
2222
$formatter = $this->getMockBuilder(Formatter::class)
2323
->disableOriginalConstructor()
24-
->onlyMethods(['getDefaultOptions', 'getDefaultFormats'])
24+
->setMethods(['getDefaultOptions', 'getDefaultFormats'])
2525
->getMock();
2626

2727
$formatter->expects($this->once())

0 commit comments

Comments
 (0)