diff options
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 9160ea7a7c3..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() { + 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); } |