Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333893 )

Change subject: Make StatementModificationHelperTest fail when no exception 
thrown
......................................................................

Make StatementModificationHelperTest fail when no exception thrown

Change-Id: I931182f0b1c1127960f3653c19a7db08ec3665af
---
M repo/tests/phpunit/includes/Api/StatementModificationHelperTest.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/93/333893/1

diff --git 
a/repo/tests/phpunit/includes/Api/StatementModificationHelperTest.php 
b/repo/tests/phpunit/includes/Api/StatementModificationHelperTest.php
index fa3f268..088ace9 100644
--- a/repo/tests/phpunit/includes/Api/StatementModificationHelperTest.php
+++ b/repo/tests/phpunit/includes/Api/StatementModificationHelperTest.php
@@ -50,6 +50,7 @@
 
                try {
                        $helper->getEntityIdFromString( $invalidEntityIdString 
);
+                       $this->fail( 'Expected exception was not thrown' );
                } catch ( ApiUsageException $ex ) {
                        $this->assertMessage( 'invalid-entity-id', $ex );
                }
@@ -96,6 +97,7 @@
 
                try {
                        $helper->getStatementFromEntity( 'foo', $entity );
+                       $this->fail( 'Expected exception was not thrown' );
                } catch ( ApiUsageException $ex ) {
                        $this->assertMessage( 'no-such-claim', $ex );
                }
@@ -108,6 +110,7 @@
 
                try {
                        $helper->getStatementFromEntity( 'unknown', $entity );
+                       $this->fail( 'Expected exception was not thrown' );
                } catch ( ApiUsageException $ex ) {
                        $this->assertMessage( 'no-such-claim', $ex );
                }
@@ -141,6 +144,7 @@
 
                try {
                        $helper->applyChangeOp( $changeOp, new Item() );
+                       $this->fail( 'Expected exception was not thrown' );
                } catch ( ApiUsageException $ex ) {
                        $this->assertMessage( 'modification-failed', $ex );
                }
@@ -160,6 +164,7 @@
 
                try {
                        $helper->applyChangeOp( $changeOp, new Item() );
+                       $this->fail( 'Expected exception was not thrown' );
                } catch ( ApiUsageException $ex ) {
                        $this->assertMessage( 'modification-failed', $ex );
                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I931182f0b1c1127960f3653c19a7db08ec3665af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to