Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/51037
Change subject: Added to QueryEngineTest ...................................................................... Added to QueryEngineTest Change-Id: I21a14a23e5bc5ca1453d4556dce7cb07fb5a38df --- M repo/tests/phpunit/includes/Query/QueryEngineResultTest.php M repo/tests/phpunit/includes/Query/QueryEngineTest.php M repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php 3 files changed, 41 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/37/51037/1 diff --git a/repo/tests/phpunit/includes/Query/QueryEngineResultTest.php b/repo/tests/phpunit/includes/Query/QueryEngineResultTest.php index 09639fc..1d3c620 100644 --- a/repo/tests/phpunit/includes/Query/QueryEngineResultTest.php +++ b/repo/tests/phpunit/includes/Query/QueryEngineResultTest.php @@ -34,7 +34,7 @@ * @licence GNU GPL v2+ * @author Jeroen De Dauw < [email protected] > */ -class QueryEngineResultTest extends QueryEngineTest { +class QueryEngineResultTest extends \MediaWikiTestCase { // TODO diff --git a/repo/tests/phpunit/includes/Query/QueryEngineTest.php b/repo/tests/phpunit/includes/Query/QueryEngineTest.php index 8ec86d0..c1c3171 100644 --- a/repo/tests/phpunit/includes/Query/QueryEngineTest.php +++ b/repo/tests/phpunit/includes/Query/QueryEngineTest.php @@ -2,7 +2,7 @@ namespace Wikibase\Repo\Test\Query; -use Wikibase\Repo\Database\FieldDefinition; +use Wikibase\Repo\Query\QueryEngine; /** * Base test class for Wikibase\Repo\Query\QueryEngine implementing classes. @@ -32,6 +32,34 @@ */ abstract class QueryEngineTest extends \MediaWikiTestCase { - // TODO + /** + * @since wd.qe + * + * @return QueryEngine[] + */ + protected abstract function getInstances(); + + /** + * @since wd.qe + * + * @return QueryEngine[][] + */ + public function instanceProvider() { + return $this->arrayWrap( $this->getInstances() ); + } + + /** + * @dataProvider instanceProvider + * + * @param QueryEngine $queryEngine + */ + public function testGetNameReturnType( QueryEngine $queryEngine ) { + // TODO + +// $query = new \Ask\Language\Query( ); +// $this->assertInstanceOf( 'Wikibase\Repo\Query\QueryEngineResult', $queryEngine->runQuery() ); + + $this->assertTrue( true ); + } } diff --git a/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php b/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php index 9576889..b63ec59 100644 --- a/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php +++ b/repo/tests/phpunit/includes/Query/SQLStore/EngineTest.php @@ -37,6 +37,15 @@ */ class EngineTest extends QueryEngineTest { - // TODO + /** + * @see QueryEngineTest::getInstances + */ + protected function getInstances() { + $instances = array(); + + $instances[] = new Engine(); + + return $instances; + } } -- To view, visit https://gerrit.wikimedia.org/r/51037 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I21a14a23e5bc5ca1453d4556dce7cb07fb5a38df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
