diff options
Diffstat (limited to 'tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php')
-rw-r--r-- | tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php b/tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php index b51c7a54d7..d85289d0ea 100644 --- a/tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php +++ b/tests/PHPUnit/Integration/Settings/BaseSettingsTestCase.php @@ -41,12 +41,11 @@ class BaseSettingsTestCase extends IntegrationTestCase $this->assertNotNull($this->settings->getSetting('myName')); } - /** - * @expectedException \Exception - * @expectedExceptionMessage A setting with name "myName" does already exist for plugin "ExampleSettingsPlugin" - */ public function test_makeSetting_ShouldFailWhenAdingSameSettingTwice() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('A setting with name "myName" does already exist for plugin "ExampleSettingsPlugin"'); + $this->makeSetting('myName'); $this->makeSetting('myName'); } @@ -136,12 +135,11 @@ class BaseSettingsTestCase extends IntegrationTestCase $this->assertSame($setting, $settings->getSetting($settingName)); } - /** - * @expectedException \Exception - * @expectedExceptionMessage "testSetting" does already exist - */ public function test_addSetting_throwsException_IfSameSettingAddedTwice() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('"testSetting" does already exist'); + $settingName = 'testSetting'; $setting = $this->buildSetting($settingName); $settings = $this->createSettingsInstance(); |