Mglaser has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/361057 )
Change subject: API unittest FIX: Move fixture creation to setUp function
......................................................................
API unittest FIX: Move fixture creation to setUp function
Change-Id: Ic5a5c5dc6f603302f657c154194cdf821f7864af
(cherry picked from commit 3d4217ee3ad66847c83b18f9d1e16ad3586656cd)
---
M tests/api/BSApiWikiSubPageTreeStoreTest.php
1 file changed, 32 insertions(+), 9 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation
refs/changes/57/361057/1
diff --git a/tests/api/BSApiWikiSubPageTreeStoreTest.php
b/tests/api/BSApiWikiSubPageTreeStoreTest.php
index dc548c3..0dfde02 100644
--- a/tests/api/BSApiWikiSubPageTreeStoreTest.php
+++ b/tests/api/BSApiWikiSubPageTreeStoreTest.php
@@ -8,6 +8,7 @@
*/
class BSApiWikiSubPageTreeStoreTest extends BSApiExtJSStoreTestBase {
protected $iFixtureTotal = 2;
+ protected $tablesUsed = [ 'page' ];
protected function getStoreSchema() {
return [
@@ -32,16 +33,38 @@
];
}
+ protected function setUp() {
+ parent::setUp();
+ $oDbw = $this->db;
+ $oDbw->insert( 'page', array(
+ 'page_title' => "Dummy",
+ 'page_namespace' => 12,
+ 'page_restrictions' => '',
+ 'page_random' => 0,
+ 'page_latest' => 1,
+ 'page_len' => 1
+ ) );
+
+ $oDbw->insert( 'page', array(
+ 'page_title' => "Dummy/First",
+ 'page_namespace' => 12,
+ 'page_restrictions' => '',
+ 'page_random' => 0,
+ 'page_latest' => 1,
+ 'page_len' => 1
+ ) );
+
+ $oDbw->insert( 'page', array(
+ 'page_title' => "Dummy/Second",
+ 'page_namespace' => 12,
+ 'page_restrictions' => '',
+ 'page_random' => 0,
+ 'page_latest' => 1,
+ 'page_len' => 1
+ ) );
+ }
+
protected function createStoreFixtureData() {
-
- $aFixtures = [];
- $aFixtures[] = [ "Help:Dummy", "Dummy text" ];
- $aFixtures[] = [ "Help:Dummy/First", "Dummy text" ];
- $aFixtures[] = [ "Help:Dummy/Second", "Dummy text" ];
- foreach( $aFixtures as $aFixture ) {
- $this->insertPage( $aFixture[0], $aFixture[1] );
- }
-
return 2;
}
--
To view, visit https://gerrit.wikimedia.org/r/361057
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5a5c5dc6f603302f657c154194cdf821f7864af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_27
Gerrit-Owner: Mglaser <[email protected]>
Gerrit-Reviewer: ItSpiderman <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits