diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 15:27:18 +0100 |
commit | 3a7cf40aaa678bea1df143d2982d603b7a334eec (patch) | |
tree | 63c1e3ad7f7f401d14411a4d44c523632906afc9 /tests/lib/Notification/ActionTest.php | |
parent | 0568b012672d650c6b5a49e72c4028dde5463c60 (diff) | |
download | nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.tar.gz nextcloud-server-3a7cf40aaa678bea1df143d2982d603b7a334eec.zip |
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Notification/ActionTest.php')
-rw-r--r-- | tests/lib/Notification/ActionTest.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/lib/Notification/ActionTest.php b/tests/lib/Notification/ActionTest.php index 5103babd0e2..1923f2305e1 100644 --- a/tests/lib/Notification/ActionTest.php +++ b/tests/lib/Notification/ActionTest.php @@ -30,7 +30,7 @@ class ActionTest extends TestCase { /** @var IAction */ protected $action; - public function setUp(): void { + protected function setUp(): void { parent::setUp(); $this->action = new Action(); } @@ -64,9 +64,10 @@ class ActionTest extends TestCase { * @dataProvider dataSetLabelInvalid * @param mixed $label * - * @expectedException \InvalidArgumentException */ public function testSetLabelInvalid($label) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setLabel($label); } @@ -98,9 +99,10 @@ class ActionTest extends TestCase { * @dataProvider dataSetParsedLabelInvalid * @param mixed $label * - * @expectedException \InvalidArgumentException */ public function testSetParsedLabelInvalid($label) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setParsedLabel($label); } @@ -141,9 +143,10 @@ class ActionTest extends TestCase { * @param mixed $link * @param mixed $type * - * @expectedException \InvalidArgumentException */ public function testSetLinkInvalid($link, $type) { + $this->expectException(\InvalidArgumentException::class); + $this->action->setLink($link, $type); } |