WMDE-leszek has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/322918

Change subject: Add test for handling invalid fields in TermIndexEntry's 
constructor
......................................................................

Add test for handling invalid fields in TermIndexEntry's constructor

Change-Id: I3e244950bf6adecceb069e61c838e3e611e0959d
---
M lib/tests/phpunit/TermIndexEntryTest.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/lib/tests/phpunit/TermIndexEntryTest.php 
b/lib/tests/phpunit/TermIndexEntryTest.php
index 4fb7ad0..f29efc8 100644
--- a/lib/tests/phpunit/TermIndexEntryTest.php
+++ b/lib/tests/phpunit/TermIndexEntryTest.php
@@ -68,6 +68,11 @@
                $this->assertEquals( isset( $fields['termWeight'] ) ? 
$fields['termWeight'] : null, $term->getWeight() );
        }
 
+       public function testGivenInvalidField_constructorThrowsException() {
+               $this->setExpectedException( MWException::class );
+               new TermIndexEntry( [ 'fooField' => 'bar' ] );
+       }
+
        public function testClone() {
                $term = new TermIndexEntry( [ 'termText' => 'Foo' ] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e244950bf6adecceb069e61c838e3e611e0959d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to