From 3a7cf40aaa678bea1df143d2982d603b7a334eec Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 27 Nov 2019 15:27:18 +0100 Subject: Mode to modern phpunit Signed-off-by: Roeland Jago Douma --- .../dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php') diff --git a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php index 03c1ef1ff93..a79186f59a5 100644 --- a/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/BlockLegacyClientPluginTest.php @@ -42,7 +42,7 @@ class BlockLegacyClientPluginTest extends TestCase { /** @var BlockLegacyClientPlugin */ private $blockLegacyClientVersionPlugin; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->config = $this->getMockBuilder(IConfig::class) @@ -67,10 +67,11 @@ class BlockLegacyClientPluginTest extends TestCase { /** * @dataProvider oldDesktopClientProvider * @param string $userAgent - * @expectedException \Sabre\DAV\Exception\Forbidden - * @expectedExceptionMessage Unsupported client version. */ public function testBeforeHandlerException($userAgent) { + $this->expectException(\Sabre\DAV\Exception\Forbidden::class); + $this->expectExceptionMessage('Unsupported client version.'); + /** @var \Sabre\HTTP\RequestInterface | PHPUnit_Framework_MockObject_MockObject $request */ $request = $this->createMock('\Sabre\HTTP\RequestInterface'); $request -- cgit v1.2.3