Dvogel hallowelt has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/390383 )
Change subject: UsageTracker: fixed php unit test
......................................................................
UsageTracker: fixed php unit test
Change-Id: I552d7d7a7471aa7afad982f8455843db258761af
---
M UsageTracker/tests/phpunit/UsageTrackerStoreTest.php
1 file changed, 11 insertions(+), 3 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/83/390383/1
diff --git a/UsageTracker/tests/phpunit/UsageTrackerStoreTest.php
b/UsageTracker/tests/phpunit/UsageTrackerStoreTest.php
index 6200328..b9fddb1 100644
--- a/UsageTracker/tests/phpunit/UsageTrackerStoreTest.php
+++ b/UsageTracker/tests/phpunit/UsageTrackerStoreTest.php
@@ -3,11 +3,17 @@
/**
* @group medium
* @group Api
+ * @group Database
* @group BlueSpice
* @group BlueSpiceExtensions
*/
class UsageTrackerStoreTest extends BSApiExtJSStoreTestBase {
protected $iFixtureTotal = 3;
+ protected $tablesUsed = [ 'bs_usagetracker' ];
+
+ protected function skipAssertTotal() {
+ return true;
+ }
protected function getStoreSchema() {
return [
@@ -32,14 +38,16 @@
];
}
- protected function createStoreFixtureData() {
+ protected function createStoreFixtureData() {}
+
+ public function addDBData() {
$aFixtureData = array(
array( 'ut_identifier' => 'dummy', 'ut_count' => 2,
'ut_type' => 'BS\UsageTracker\Collectors\Property', 'ut_timestamp' =>
wfTimestampNow () ),
array( 'ut_identifier' => 'dummy2', 'ut_count' => 4,
'ut_type' => 'BS\UsageTracker\Collectors\Property', 'ut_timestamp' =>
wfTimestampNow () ),
array( 'ut_identifier' => 'test', 'ut_count' => 8,
'ut_type' => 'BS\UsageTracker\Collectors\Property', 'ut_timestamp' =>
wfTimestampNow () )
);
- $oDbw = wfGetDB( DB_MASTER );
- $oDbw->insert(
+
+ $this->db->insert(
'bs_usagetracker',
$aFixtureData,
__METHOD__
--
To view, visit https://gerrit.wikimedia.org/r/390383
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I552d7d7a7471aa7afad982f8455843db258761af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Dvogel hallowelt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits