Matthias Mullie has uploaded a new change for review.
https://gerrit.wikimedia.org/r/199894
Change subject: API tests use all Flow tables
......................................................................
API tests use all Flow tables
Pretty much all tables are being used in API tests.
Nearly all of them create a topic, which results in most
of those tables being filled up already.
These tests are intended to test interoperability between
pretty much everything Flow has to offer, so they have to
operate on all tables.
Change-Id: Ia44aa160e184169447ef418e2fb1d852648d15e7
---
M tests/phpunit/api/ApiFlowEditHeaderTest.php
M tests/phpunit/api/ApiFlowEditPostTest.php
M tests/phpunit/api/ApiFlowEditTitleTest.php
M tests/phpunit/api/ApiFlowEditTopicSummary.php
M tests/phpunit/api/ApiFlowLockTopicTest.php
M tests/phpunit/api/ApiFlowModeratePostTest.php
M tests/phpunit/api/ApiFlowModerateTopicTest.php
M tests/phpunit/api/ApiFlowReplyTest.php
M tests/phpunit/api/ApiFlowViewHeaderTest.php
M tests/phpunit/api/ApiTestCase.php
10 files changed, 22 insertions(+), 28 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow
refs/changes/94/199894/1
diff --git a/tests/phpunit/api/ApiFlowEditHeaderTest.php
b/tests/phpunit/api/ApiFlowEditHeaderTest.php
index b69ac78..a45e8c8 100644
--- a/tests/phpunit/api/ApiFlowEditHeaderTest.php
+++ b/tests/phpunit/api/ApiFlowEditHeaderTest.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowEditHeaderTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testEditHeader() {
$data = $this->doApiRequest( array(
'page' => "Talk:Flow_QA",
diff --git a/tests/phpunit/api/ApiFlowEditPostTest.php
b/tests/phpunit/api/ApiFlowEditPostTest.php
index 57552ee..d4558ee 100644
--- a/tests/phpunit/api/ApiFlowEditPostTest.php
+++ b/tests/phpunit/api/ApiFlowEditPostTest.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowEditPostTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testEditPost() {
$result = $this->createTopic( 'result' );
$workflowId = $result['roots'][0];
diff --git a/tests/phpunit/api/ApiFlowEditTitleTest.php
b/tests/phpunit/api/ApiFlowEditTitleTest.php
index 2bc8549..17b9a0f 100644
--- a/tests/phpunit/api/ApiFlowEditTitleTest.php
+++ b/tests/phpunit/api/ApiFlowEditTitleTest.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowEditTitleTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testEditTitle() {
$result = $this->createTopic( 'result' );
$workflowId = $result['roots'][0];
diff --git a/tests/phpunit/api/ApiFlowEditTopicSummary.php
b/tests/phpunit/api/ApiFlowEditTopicSummary.php
index b952c56..73a899e 100644
--- a/tests/phpunit/api/ApiFlowEditTopicSummary.php
+++ b/tests/phpunit/api/ApiFlowEditTopicSummary.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowEditTopicSummaryTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testEditTopicSummary() {
$workflowId = $this->createTopic();
$data = $this->doApiRequest( array(
diff --git a/tests/phpunit/api/ApiFlowLockTopicTest.php
b/tests/phpunit/api/ApiFlowLockTopicTest.php
index 9c3810a..7019a9d 100644
--- a/tests/phpunit/api/ApiFlowLockTopicTest.php
+++ b/tests/phpunit/api/ApiFlowLockTopicTest.php
@@ -11,11 +11,6 @@
* @group medium
*/
class ApiFlowLockTopicTest extends ApiTestCase {
- /**
- * @var array
- */
- protected $tablesUsed = array( 'flow_revision', 'flow_tree_revision' );
-
public function testLockTopic() {
$workflowId = $this->createTopic();
$data = $this->doApiRequest( array(
diff --git a/tests/phpunit/api/ApiFlowModeratePostTest.php
b/tests/phpunit/api/ApiFlowModeratePostTest.php
index 274627f..4ac36ef 100644
--- a/tests/phpunit/api/ApiFlowModeratePostTest.php
+++ b/tests/phpunit/api/ApiFlowModeratePostTest.php
@@ -12,9 +12,6 @@
* @group medium
*/
class ApiFlowModeratePostTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testModeratePost() {
$result = $this->createTopic( 'result' );
$workflowId = $result['roots'][0];
diff --git a/tests/phpunit/api/ApiFlowModerateTopicTest.php
b/tests/phpunit/api/ApiFlowModerateTopicTest.php
index 74779b9..76ff688 100644
--- a/tests/phpunit/api/ApiFlowModerateTopicTest.php
+++ b/tests/phpunit/api/ApiFlowModerateTopicTest.php
@@ -12,8 +12,17 @@
* @group medium
*/
class ApiFlowModerateTopicTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision', 'logging' );
+ protected $tablesUsed = array(
+ 'flow_ext_ref',
+ 'flow_revision',
+ 'flow_subscription',
+ 'flow_topic_list',
+ 'flow_tree_node',
+ 'flow_tree_revision',
+ 'flow_wiki_ref',
+ 'flow_workflow',
+ 'logging',
+ );
public function testModerateTopic() {
$workflowId = $this->createTopic();
diff --git a/tests/phpunit/api/ApiFlowReplyTest.php
b/tests/phpunit/api/ApiFlowReplyTest.php
index 643c726..f69d4f4 100644
--- a/tests/phpunit/api/ApiFlowReplyTest.php
+++ b/tests/phpunit/api/ApiFlowReplyTest.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowReplyTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision', 'flow_tree_revision',
'flow_tree_node' );
-
public function testTopLevelReply() {
$result = $this->createTopic( 'result' );
$workflowId = $result['roots'][0];
diff --git a/tests/phpunit/api/ApiFlowViewHeaderTest.php
b/tests/phpunit/api/ApiFlowViewHeaderTest.php
index de16907..4f8c59a 100644
--- a/tests/phpunit/api/ApiFlowViewHeaderTest.php
+++ b/tests/phpunit/api/ApiFlowViewHeaderTest.php
@@ -11,9 +11,6 @@
* @group medium
*/
class ApiFlowViewHeaderTest extends ApiTestCase {
-
- protected $tablesUsed = array( 'flow_revision' );
-
public function testViewEmptyHeader() {
$data = $this->doApiRequest( array(
'page' => "Talk:Flow_QA",
diff --git a/tests/phpunit/api/ApiTestCase.php
b/tests/phpunit/api/ApiTestCase.php
index 43d0816..402fe19 100644
--- a/tests/phpunit/api/ApiTestCase.php
+++ b/tests/phpunit/api/ApiTestCase.php
@@ -13,6 +13,17 @@
* @group medium
*/
abstract class ApiTestCase extends BaseApiTestCase {
+ protected $tablesUsed = array(
+ 'flow_ext_ref',
+ 'flow_revision',
+ 'flow_subscription',
+ 'flow_topic_list',
+ 'flow_tree_node',
+ 'flow_tree_revision',
+ 'flow_wiki_ref',
+ 'flow_workflow',
+ );
+
protected function setUp() {
$this->setMwGlobals( 'wgFlowOccupyPages', array(
// For testing use; shared with browser tests
--
To view, visit https://gerrit.wikimedia.org/r/199894
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia44aa160e184169447ef418e2fb1d852648d15e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits