John Erling Blad has submitted this change and it was merged.
Change subject: Added to QueryStoreTest
......................................................................
Added to QueryStoreTest
Change-Id: I2527d2763a88caa0efac4fa88e9dbd15b1b55494
---
M repo/tests/phpunit/includes/Query/QueryStoreTest.php
M repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
2 files changed, 36 insertions(+), 2 deletions(-)
Approvals:
John Erling Blad: Verified; Looks good to me, approved
diff --git a/repo/tests/phpunit/includes/Query/QueryStoreTest.php
b/repo/tests/phpunit/includes/Query/QueryStoreTest.php
index ba166ab..21209b9 100644
--- a/repo/tests/phpunit/includes/Query/QueryStoreTest.php
+++ b/repo/tests/phpunit/includes/Query/QueryStoreTest.php
@@ -2,6 +2,8 @@
namespace Wikibase\Repo\Test\Query;
+use Wikibase\Repo\Query\QueryStore;
+
/**
* Base test class for Wikibase\Repo\Query\QueryStore implementing classes.
*
@@ -30,6 +32,29 @@
*/
abstract class QueryStoreTest extends \MediaWikiTestCase {
- // TODO
+ /**
+ * @since wd.qe
+ *
+ * @return QueryStore[]
+ */
+ protected abstract function getInstances();
+
+ /**
+ * @since wd.qe
+ *
+ * @return QueryStore[][]
+ */
+ public function instanceProvider() {
+ return $this->arrayWrap( $this->getInstances() );
+ }
+
+ /**
+ * @dataProvider instanceProvider
+ *
+ * @param QueryStore $queryStore
+ */
+ public function testGetNameReturnType( QueryStore $queryStore ) {
+ $this->assertInternalType( 'string', $queryStore->getName() );
+ }
}
diff --git a/repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
b/repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
index c3c1cc7..55edecc 100644
--- a/repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
+++ b/repo/tests/phpunit/includes/Query/SQLStore/StoreTest.php
@@ -37,6 +37,15 @@
*/
class StoreTest extends QueryStoreTest {
- // TODO
+ /**
+ * @see QueryStoreTest::getInstances
+ */
+ protected function getInstances() {
+ $instances = array();
+
+ $instances[] = new Store( 'foo', array() );
+
+ return $instances;
+ }
}
--
To view, visit https://gerrit.wikimedia.org/r/51036
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2527d2763a88caa0efac4fa88e9dbd15b1b55494
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Daniel Werner <[email protected]>
Gerrit-Reviewer: John Erling Blad <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits