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 --- tests/Core/Command/Config/System/SetConfigTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/Core/Command/Config/System/SetConfigTest.php') diff --git a/tests/Core/Command/Config/System/SetConfigTest.php b/tests/Core/Command/Config/System/SetConfigTest.php index e3cfa89093d..9b34afed691 100644 --- a/tests/Core/Command/Config/System/SetConfigTest.php +++ b/tests/Core/Command/Config/System/SetConfigTest.php @@ -102,9 +102,10 @@ class SetConfigTest extends TestCase { /** * @dataProvider setUpdateOnlyProvider - * @expectedException \UnexpectedValueException */ public function testSetUpdateOnly($configNames, $existingData) { + $this->expectException(\UnexpectedValueException::class); + $this->systemConfig->expects($this->never()) ->method('setValue'); $this->systemConfig->method('getValue') @@ -169,9 +170,10 @@ class SetConfigTest extends TestCase { /** * @dataProvider castValueInvalidProvider - * @expectedException \InvalidArgumentException */ public function testCastValueInvalid($value, $type) { + $this->expectException(\InvalidArgumentException::class); + $this->invokePrivate($this->command, 'castValue', [$value, $type]); } -- cgit v1.2.3