summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes/api/ApiQueryTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/api/ApiQueryTest.php')
-rw-r--r--tests/phpunit/includes/api/ApiQueryTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/api/ApiQueryTest.php b/tests/phpunit/includes/api/ApiQueryTest.php
index 114eadf3..ae05a30a 100644
--- a/tests/phpunit/includes/api/ApiQueryTest.php
+++ b/tests/phpunit/includes/api/ApiQueryTest.php
@@ -22,10 +22,13 @@ class ApiQueryTest extends ApiTestCase {
$this->assertArrayHasKey( 'query', $data[0] );
$this->assertArrayHasKey( 'normalized', $data[0]['query'] );
+ // Forge a normalized title
+ $to = Title::newFromText( $wgMetaNamespace.':ArticleA' );
+
$this->assertEquals(
array(
'from' => 'Project:articleA',
- 'to' => $wgMetaNamespace . ':ArticleA'
+ 'to' => $to->getPrefixedText(),
),
$data[0]['query']['normalized'][0]
);
@@ -50,7 +53,6 @@ class ApiQueryTest extends ApiTestCase {
'action' => 'query',
'titles' => $title . '|Talk:' ) );
-
$this->assertArrayHasKey( 'query', $data[0] );
$this->assertArrayHasKey( 'pages', $data[0]['query'] );
$this->assertEquals( 2, count( $data[0]['query']['pages'] ) );
@@ -60,8 +62,6 @@ class ApiQueryTest extends ApiTestCase {
$this->assertArrayHasKey( 'missing', $data[0]['query']['pages'][-2] );
$this->assertArrayHasKey( 'invalid', $data[0]['query']['pages'][-1] );
-
-
}
}