8000 Handle old version of phpunit for php 5.5 · symfony/symfony@669122c · GitHub
[go: up one dir, main page]

Skip to content

Commit 669122c

Browse files
committed
Handle old version of phpunit for php 5.5
1 parent d6e8cb3 commit 669122c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Component/Config/Tests/Definition/BaseNodeTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ public function testGetPathForChildNode($expected, array $params)
2626
$constructorArgs[] = $params[0];
2727

2828
if (isset($params[1])) {
29-
$parent = $this->createMock(NodeInterface::class);
29+
// Handle old PHPUnit version for PHP 5.5
30+
$parent = method_exists($this, 'createMock')
31+
? $this->createMock(NodeInterface::class)
32+
: $this->getMock(NodeInterface::class);
3033
$parent->method('getPath')->willReturn($params[1]);
3134

3235
$constructorArgs[] = $parent;

src/Symfony/Component/Config/Tests/Definition/Builder/NodeDefinitionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class NodeDefinitionTest extends TestCase
2020
{
2121
public function testDefaultPathSeparatorIsDot()
2222
{
23-
$node = $this->createMock(NodeDefinition::class);
23+
$node = $this->getMockForAbstractClass(NodeDefinition::class, array('foo'));
2424

2525
$this->assertAttributeSame('.', 'pathSeparator', $node);
2626
}

0 commit comments

Comments
 (0)
0