Skip to content
This repository was archived by the owner on Jan 20, 2019. It is now read-only.

Commit 5d3801c

Browse files
committed
Fix undefined method in PHP 5.5 build
1 parent af4e4ab commit 5d3801c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/ConverterCachedTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66

77
final class ConverterCachedTest extends PHPUnit_Framework_TestCase
88
{
9+
private function mock($className)
10+
{
11+
return $this->getMockBuilder($className)
12+
->disableOriginalConstructor()
13+
->disableOriginalClone()
14+
->disableArgumentCloning()
15+
->disallowMockingUnknownTypes()
16+
->getMock();
17+
}
18+
919
public function test_it_caches_calculated_regexes()
1020
{
1121
$range = new Range(1, 2);
1222

13-
$mock = $this->createMock(Converter::class);
23+
$mock = $this->mock(Converter::class);
1424
$mock->expects($this->once())
1525
->method('toRegex')
1626
->with($this->equalTo($range))

0 commit comments

Comments
 (0)