Skip to content

Commit 9720d7e

Browse files
committed
Compatibility with PHPUnit v5
1 parent 8b00112 commit 9720d7e

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"require-dev": {
2020
"clue/block-react": "^1.1",
21-
"phpunit/phpunit": "^4.8"
21+
"phpunit/phpunit": "^5.0 || ^4.8"
2222
},
2323
"autoload": {
2424
"psr-4": { "Clue\\React\\Zenity\\": "src/" }

tests/FunctionalLauncherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function setUp()
1515
{
1616
$this->loop = Factory::create();
1717

18-
$this->dialog = $this->getMock('Clue\React\Zenity\Dialog\AbstractDialog');
18+
$this->dialog = $this->getMockBuilder('Clue\React\Zenity\Dialog\AbstractDialog')->getMock();
1919
$this->dialog->expects($this->once())->method('createZen')->will($this->returnValue(new BaseZen()));
2020

2121
$this->launcher = new Launcher($this->loop);

tests/Zen/BaseZenTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ abstract class BaseZenTest extends TestCase
1313
public function setUp()
1414
{
1515
$inbuffer =& $this->stdin;
16-
$this->instream = $this->getMock('React\Stream\WritableStreamInterface');
16+
$this->instream = $this->getMockBuilder('React\Stream\WritableStreamInterface')->getMock();
1717
$this->instream->expects($this->any())->method('write')->will($this->returnCallback(function ($value) use (&$inbuffer) {
1818
$inbuffer .= $value;
1919
}));
2020

2121
$this->process = $this->getMockBuilder('React\ChildProcess\Process')->disableOriginalConstructor()->getMock();
2222
$this->process->stdin = $this->instream;
2323

24-
$this->process->stdout = $this->getMock('React\Stream\ReadableStreamInterface');
25-
$this->process->stderr = $this->getMock('React\Stream\ReadableStreamInterface');
24+
$this->process->stdout = $this->getMockBuilder('React\Stream\ReadableStreamInterface')->getMock();
25+
$this->process->stderr = $this->getMockBuilder('React\Stream\ReadableStreamInterface')->getMock();
2626
}
2727

2828
public function testClosingZenTerminatesProcess()

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function expectCallableNever()
4242
*/
4343
protected function createCallableMock()
4444
{
45-
return $this->getMock('CallableStub');
45+
return $this->getMockBuilder('CallableStub')->getMock();
4646
}
4747

4848
protected function expectPromiseResolve($promise)

0 commit comments

Comments
 (0)