Skip to content

Commit 43e4add

Browse files
Merge branch '3.2'
* 3.2: Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 Further refactorings to PHPUnit namespaces resolve parameters in definition classes
2 parents 3db0cb6 + 92d035f commit 43e4add

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Tests/Config/FileLocatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testLocate()
3030
$kernel
3131
->expects($this->never())
3232
->method('locateResource');
33-
$this->setExpectedException('LogicException');
33+
$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('LogicException');
3434
$locator->locate('/some/path');
3535
}
3636

Tests/Controller/ControllerResolverTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ public function testGetControllerWithFunction()
118118
public function testGetControllerOnNonUndefinedFunction($controller, $exceptionName = null, $exceptionMessage = null)
119119
{
120120
$resolver = $this->createControllerResolver();
121-
$this->setExpectedException($exceptionName, $exceptionMessage);
121+
if (method_exists($this, 'expectException')) {
122+
$this->expectException($exceptionName);
123+
$this->expectExceptionMessage($exceptionMessage);
124+
} else {
125+
$this->setExpectedException($exceptionName, $exceptionMessage);
126+
}
122127

123128
$request = Request::create('/');
124129
$request->attributes->set('_controller', $controller);

0 commit comments

Comments
 (0)