make sure we test normalization against normalized title
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiQueryTest.php
index e838acf..ae05a30 100644 (file)
@@ -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]
                );