Hoo man has submitted this change and it was merged.
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(-)
Approvals:
Hoo man: Verified; Looks good to me, approved
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: merged
Gerrit-Change-Id: Ifed75f5488635d00b7d9caecd8da89768602fe34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits