jenkins-bot has submitted this change and it was merged.

Change subject: Use InvalidArgumentException in SiteLink
......................................................................


Use InvalidArgumentException in SiteLink

Change-Id: Iec580382a2744fc5dd9ba2910411cb6ea9c493aa
---
M DataModel/DataModel/SiteLink.php
M DataModel/tests/phpunit/SiteLinkTest.php
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/DataModel/DataModel/SiteLink.php b/DataModel/DataModel/SiteLink.php
index 7cfc36e..77368cd 100644
--- a/DataModel/DataModel/SiteLink.php
+++ b/DataModel/DataModel/SiteLink.php
@@ -2,7 +2,7 @@
 
 namespace Wikibase;
 
-use MWException;
+use InvalidArgumentException;
 use Site;
 use Sites;
 
@@ -90,11 +90,11 @@
         * @param Site   $site  The site the page link points to
         * @param String $page  The target page's title. This is expected to 
already be normalized.
         *
-        * @throws MWException
+        * @throws InvalidArgumentException
         */
        public function __construct( Site $site, $page ) {
                if ( !is_string( $page ) ) {
-                       throw new MWException( '$page must be a string' );
+                       throw new InvalidArgumentException( '$page must be a 
string' );
                }
 
                $this->site = $site;
diff --git a/DataModel/tests/phpunit/SiteLinkTest.php 
b/DataModel/tests/phpunit/SiteLinkTest.php
index 130b718..a339087 100644
--- a/DataModel/tests/phpunit/SiteLinkTest.php
+++ b/DataModel/tests/phpunit/SiteLinkTest.php
@@ -123,7 +123,7 @@
         * @dataProvider siteProvider
         */
        public function testConstructorWithNullPageName( Site $site ) {
-               $this->setExpectedException( 'MWException' );
+               $this->setExpectedException( 'InvalidArgumentException' );
                new SiteLink( $site, null );
        }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/67517
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec580382a2744fc5dd9ba2910411cb6ea9c493aa
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to