Skip to content

Commit

Permalink
Make compatible with latest phpunit
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Sep 19, 2016
1 parent d8e60a5 commit 5277094
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Psr/Log/Test/LoggerInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public function testContextReplacement()

public function testObjectCastToString()
{
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
if (method_exists($this, 'createMock')) {
$dummy = $this->createMock('Psr\Log\Test\DummyTest', array('__toString'));
} else {
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
}
$dummy->expects($this->once())
->method('__toString')
->will($this->returnValue('DUMMY'));
Expand Down Expand Up @@ -130,4 +134,7 @@ public function testContextExceptionKeyCanBeExceptionOrOtherValues()

class DummyTest
{
public function __toString()
{
}
}

0 comments on commit 5277094

Please sign in to comment.