Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/61563
Change subject: Fix DispatchStatsTest ...................................................................... Fix DispatchStatsTest * renamed misnamed test class * replaced "truncate" with "delete" for SQLite compatibility Change-Id: Icae47e5e29217a647b2e0ed513542996b82d40c6 --- M repo/Wikibase.hooks.php M repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php 2 files changed, 5 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/63/61563/1 diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php index c21c2f5..16501ab 100755 --- a/repo/Wikibase.hooks.php +++ b/repo/Wikibase.hooks.php @@ -203,6 +203,7 @@ 'store/StoreFactory', 'store/Store', + 'store/sql/DispatchStats', 'store/sql/SqlIdGenerator', 'store/sql/TermSqlIndex', 'store/sql/TermSearchKeyBuilder', diff --git a/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php b/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php index fed758b..885d409 100644 --- a/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php +++ b/repo/tests/phpunit/includes/store/sql/DispatchStatsTest.php @@ -4,9 +4,6 @@ use Wikibase\DispatchStats; /** - * FIXME: this class is not registered in the test hook - * FIXME: there already is a EntityChangeTest in lib - * * Tests for the Wikibase\EntityChange class. * * This program is free software; you can redistribute it and/or modify @@ -38,7 +35,7 @@ * @licence GNU GPL v2+ * @author Daniel Kinzler */ -class EntityChangeTest extends \MediaWikiTestCase { +class DispatchStatsTest extends \MediaWikiTestCase { /** * Creates and loads a DispatchStats object, injecting test data into @@ -52,10 +49,10 @@ $changes = $data['changes']; $states = $data['states']; - $dbw = wfGetDB( DB_MASTER ); // write to dummy tables + $dbw = wfGetDB( DB_MASTER ); // writes to dummy tables - $dbw->query( "truncate " . $dbw->tableName( 'wb_changes' ) ); - $dbw->query( "truncate " . $dbw->tableName( 'wb_changes_dispatch' ) ); + $dbw->delete( 'wb_changes', array( "1" ) ); + $dbw->delete( 'wb_changes_dispatch', array( "1" ) ); foreach ( $changes as $row ) { if ( $row === null ) { -- To view, visit https://gerrit.wikimedia.org/r/61563 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icae47e5e29217a647b2e0ed513542996b82d40c6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler <daniel.kinz...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits