Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgiehl <stefan@matomo.org>2020-12-07 15:56:19 +0300
committersgiehl <stefan@matomo.org>2020-12-07 15:56:19 +0300
commit931b2137cc3f8320904f30431269d7564174c85b (patch)
tree4318715903e8999926c839def630c903d3dd987d /plugins/UsersManager
parent959c7282707c19df63d17b903f9d0fdeed34fc21 (diff)
convert remaining expectedException annotations in tests
Diffstat (limited to 'plugins/UsersManager')
-rw-r--r--plugins/UsersManager/tests/Integration/UserPreferencesTest.php17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/UsersManager/tests/Integration/UserPreferencesTest.php b/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
index bf17cf688e..c2a1099420 100644
--- a/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
+++ b/plugins/UsersManager/tests/Integration/UserPreferencesTest.php
@@ -6,7 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
-namespace Piwik\Plugins\UsersManager\tests;
+namespace Piwik\Plugins\UsersManager\tests\Integration;
use Piwik\Config;
use Piwik\Piwik;
@@ -43,12 +43,11 @@ class UserPreferencesTest extends IntegrationTestCase
FakeAccess::$identity = $identity;
}
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage User does not exist
- */
public function test_getDefaultReport_WhenLoginNotExists()
{
+ self::expectException(\Exception::class);
+ self::expectExceptionMessage('User does not exist');
+
APIUsersManager::getInstance()->setUserPreference(
'foo',
APIUsersManager::PREFERENCE_DEFAULT_REPORT,
@@ -56,13 +55,11 @@ class UserPreferencesTest extends IntegrationTestCase
);
}
-
- /**
- * @expectedException \Exception
- * @expectedExceptionMessage Not supported preference name
- */
public function test_getDefaultReport_WhenWrongPreference()
{
+ self::expectException(\Exception::class);
+ self::expectExceptionMessage('Not supported preference name');
+
APIUsersManager::getInstance()->setUserPreference(
Piwik::getCurrentUserLogin(),
'foo',