summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/api/query/ApiQueryContinueTest.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-06-04 07:31:04 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-06-04 07:58:39 +0200
commitf6d65e533c62f6deb21342d4901ece24497b433e (patch)
treef28adf0362d14bcd448f7b65a7aaf38650f923aa /tests/phpunit/includes/api/query/ApiQueryContinueTest.php
parentc27b2e832fe25651ef2410fae85b41072aae7519 (diff)
Update to MediaWiki 1.25.1
Diffstat (limited to 'tests/phpunit/includes/api/query/ApiQueryContinueTest.php')
-rw-r--r--tests/phpunit/includes/api/query/ApiQueryContinueTest.php26
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/phpunit/includes/api/query/ApiQueryContinueTest.php b/tests/phpunit/includes/api/query/ApiQueryContinueTest.php
index 03797901..d441f4c4 100644
--- a/tests/phpunit/includes/api/query/ApiQueryContinueTest.php
+++ b/tests/phpunit/includes/api/query/ApiQueryContinueTest.php
@@ -18,8 +18,6 @@
* http://www.gnu.org/copyleft/gpl.html
*/
-require_once 'ApiQueryContinueTestBase.php';
-
/**
* These tests validate the new continue functionality of the api query module by
* doing multiple requests with varying parameters, merging the results, and checking
@@ -68,7 +66,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
'aplimit' => "$l",
);
};
- $data = $this->query( $mk( 99 ), 1, '1L', false );
+ $data = $this->query( $mk( 99 ), 1, '1L', false ) +
+ array( 'batchcomplete' => true );
// 1 list
$this->checkC( $data, $mk( 1 ), 5, '1L-1' );
@@ -95,7 +94,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// 2 lists
- $data = $this->query( $mk( 99, 99 ), 1, '2L', false );
+ $data = $this->query( $mk( 99, 99 ), 1, '2L', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, 1 ), 5, '2L-11' );
$this->checkC( $data, $mk( 2, 2 ), 3, '2L-22' );
$this->checkC( $data, $mk( 3, 3 ), 2, '2L-33' );
@@ -119,7 +119,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 1 prop
- $data = $this->query( $mk( 99, 99 ), 1, 'G1P', false );
+ $data = $this->query( $mk( 99, 99 ), 1, 'G1P', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, 1 ), 11, 'G1P-11' );
$this->checkC( $data, $mk( 2, 2 ), 6, 'G1P-22' );
$this->checkC( $data, $mk( 3, 3 ), 4, 'G1P-33' );
@@ -144,7 +145,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 2 props
- $data = $this->query( $mk( 99, 99, 99 ), 1, 'G2P', false );
+ $data = $this->query( $mk( 99, 99, 99 ), 1, 'G2P', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, 1, 1 ), 16, 'G2P-111' );
$this->checkC( $data, $mk( 2, 2, 2 ), 9, 'G2P-222' );
$this->checkC( $data, $mk( 3, 3, 3 ), 6, 'G2P-333' );
@@ -177,7 +179,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 1 prop + 1 list
- $data = $this->query( $mk( 99, 99, 99 ), 1, 'G1P1L', false );
+ $data = $this->query( $mk( 99, 99, 99 ), 1, 'G1P1L', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, 1, 1 ), 11, 'G1P1L-111' );
$this->checkC( $data, $mk( 2, 2, 2 ), 6, 'G1P1L-222' );
$this->checkC( $data, $mk( 3, 3, 3 ), 4, 'G1P1L-333' );
@@ -214,7 +217,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 1 prop + 1 list
- $data = $this->query( $mk( 99, 99, 99, 99, 99 ), 1, 'G2P2L1M', false );
+ $data = $this->query( $mk( 99, 99, 99, 99, 99 ), 1, 'G2P2L1M', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, 1, 1, 1, 1 ), 16, 'G2P2L1M-11111' );
$this->checkC( $data, $mk( 2, 2, 2, 2, 2 ), 9, 'G2P2L1M-22222' );
$this->checkC( $data, $mk( 3, 3, 3, 3, 3 ), 6, 'G2P2L1M-33333' );
@@ -244,7 +248,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 1 prop
- $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=P', false );
+ $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=P', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, true, 1, true ), 4, 'G=P-1t1t' );
$this->checkC( $data, $mk( 2, true, 2, true ), 2, 'G=P-2t2t' );
@@ -290,7 +295,8 @@ class ApiQueryContinueTest extends ApiQueryContinueTestBase {
);
};
// generator + 1 list
- $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=L', false );
+ $data = $this->query( $mk( 99, true, 99, true ), 1, 'G=L', false ) +
+ array( 'batchcomplete' => true );
$this->checkC( $data, $mk( 1, true, 1, true ), 5, 'G=L-1t1t' );
$this->checkC( $data, $mk( 2, true, 2, true ), 3, 'G=L-2t2t' );