Skip to content

Commit 936eed8

Browse files
authored
Merge pull request #11 from siwinski/pr-phpunit-5-4-createMock
Update tests to use createMock() instead of getMock() for PHPUnit 5.4+
2 parents ecf4861 + 82a388a commit 936eed8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ class HighlighterTest extends \PHPUnit_Framework_TestCase
88

99
protected function getConsoleColorMock()
1010
{
11-
$mock = $this->getMock('\JakubOnderka\PhpConsoleColor\ConsoleColor');
11+
$mock = method_exists($this, 'createMock')
12+
? $this->createMock('\JakubOnderka\PhpConsoleColor\ConsoleColor')
13+
: $this->getMock('\JakubOnderka\PhpConsoleColor\ConsoleColor');
1214

1315
$mock->expects($this->any())
1416
->method('apply')
@@ -260,4 +262,4 @@ public function testEmpty()
260262
''
261263
);
262264
}
263-
}
265+
}

0 commit comments

Comments
 (0)