ItSpiderman has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/358016 )
Change subject: [WIP] API unittest: BSApiUploadLicenseStore
......................................................................
[WIP] API unittest: BSApiUploadLicenseStore
Change-Id: I90fc4ded6c5a3174fb6472f663672ef42b342fd7
ERM: #6560
---
A tests/api/BSApiUploadLicenseStoreTest.php
1 file changed, 75 insertions(+), 0 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation
refs/changes/16/358016/1
diff --git a/tests/api/BSApiUploadLicenseStoreTest.php
b/tests/api/BSApiUploadLicenseStoreTest.php
new file mode 100644
index 0000000..1076283
--- /dev/null
+++ b/tests/api/BSApiUploadLicenseStoreTest.php
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * @group medium
+ * @group api
+ * @group BlueSpice
+ * @group BlueSpiceFoundation
+ */
+class BSApiUploadLicenseStoreTest extends BSApiExtJSStoreTestBase {
+ protected $iFixtureTotal = 2;
+
+ protected function getStoreSchema() {
+ return [
+ 'text' => [
+ 'type' => 'string'
+ ],
+ 'value' => [
+ 'type' => 'string'
+ ],
+ 'indent' => [
+ 'type' => 'integer'
+ ]
+ ];
+ }
+
+ protected function createStoreFixtureData() {
+ $oLicensesTitle = Title::makeTitle( NS_MEDIAWIKI, 'Licenses' );
+ $oWikiPage = WikiPage::factory( $oLicensesTitle );
+ $sLicenses = '* Dummy | Dummy license';
+ $oContent = ContentHandler::makeContent( $sLicenses,
$oLicensesTitle );
+ $oWikiPage->doEditContent( $oContent, '' );
+ return 2;
+ }
+
+ protected function getModuleName() {
+ return 'bs-upload-license-store';
+ }
+
+ public function provideSingleFilterData() {
+ return [
+ 'Filter by text' => [ 'string', 'ct', 'text', 'None', 1
]
+ ];
+ }
+
+ public function provideMultipleFilterData() {
+ return [
+ 'Filter by indent and text' => [
+ [
+ [
+ 'type' => 'string',
+ 'comparison' => 'ct',
+ 'field' => 'text',
+ 'value' => 'none'
+ ],
+ [
+ 'type' => 'numeric',
+ 'comparison' => 'eq',
+ 'field' => 'indent',
+ 'value' => 0
+ ]
+ ],
+ 1
+ ]
+ ];
+ }
+
+ /*public function provideKeyItemData() {
+ return array(
+ [ 'iw_url', 'http://wiki.demo.org/$1' ],
+ [ 'iw_api', 'http://wiki.demo.org/api.php' ],
+ [ 'iw_prefix', 'Demo' ]
+ );
+ }*/
+}
+
--
To view, visit https://gerrit.wikimedia.org/r/358016
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90fc4ded6c5a3174fb6472f663672ef42b342fd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: ItSpiderman <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits