Thiemo Mättig (WMDE) has uploaded a new change for review.
https://gerrit.wikimedia.org/r/262454
Change subject: Add missing test case to DataTypeSelectorTest
......................................................................
Add missing test case to DataTypeSelectorTest
Change-Id: Ifed75f5488635d00b7d9caecd8da89768602fe34
---
M repo/tests/phpunit/includes/DataTypeSelectorTest.php
1 file changed, 18 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/54/262454/1
diff --git a/repo/tests/phpunit/includes/DataTypeSelectorTest.php
b/repo/tests/phpunit/includes/DataTypeSelectorTest.php
index d261b0a..d914cab 100644
--- a/repo/tests/phpunit/includes/DataTypeSelectorTest.php
+++ b/repo/tests/phpunit/includes/DataTypeSelectorTest.php
@@ -30,6 +30,24 @@
}
/**
+ * @dataProvider invalidConstructorArgumentsProvider
+ */
+ public function testConstructorThrowsException( array $dataTypes,
$languageCode ) {
+ $this->setExpectedException( 'MWException' );
+ new DataTypeSelector( $dataTypes, $languageCode );
+ }
+
+ public function invalidConstructorArgumentsProvider() {
+ return array(
+ array( array(), null ),
+ array( array(), false ),
+ array( array( null ), '' ),
+ array( array( false ), '' ),
+ array( array( '' ), '' ),
+ );
+ }
+
+ /**
* @dataProvider getHtmlProvider
*/
public function testGetHtml( array $dataTypes, $selectedTypeId,
$expected ) {
--
To view, visit https://gerrit.wikimedia.org/r/262454
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifed75f5488635d00b7d9caecd8da89768602fe34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits