Bump phpunit and fix CI

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2019-12-17 11:54:45 +01:00
parent f575202a8a
commit 4c0512f0b7
42 changed files with 159 additions and 209 deletions

View File

@@ -45,7 +45,7 @@ class ExceptionMiddlewareTest extends \Test\TestCase {
private $controller;
private $exceptionMiddleware;
public function setUp() {
public function setUp(): void {
$this->logger = $this->createMock(ILogger::class);
$this->config = $this->createMock(IConfig::class);
$this->controller = $this->createMock(Controller::class);
@@ -74,11 +74,9 @@ class ExceptionMiddlewareTest extends \Test\TestCase {
$this->assertEquals($expected, $result);
}
/**
* @expectedException \Exception
* @expectedExceptionMessage failed hard
*/
public function testAfterExceptionNoController() {
$this->expectException(\Exception::class);
$this->expectExceptionMessage('failed hard');
$pageController = $this->createMock(PageController::class);
$result = $this->exceptionMiddleware->afterException($pageController, 'bar', new \Exception('failed hard'));
}