r79478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79477‎ | r79478 | r79479 >
Date:06:15, 2 January 2011
Author:soxred93
Status:ok
Tags:
Comment:
Followup to r79477: Add invalid purge title
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/api/ApiPurgeTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/api/ApiPurgeTest.php
@@ -22,17 +22,22 @@
2323
2424 $data = $this->doApiRequest( array(
2525 'action' => 'purge',
26 - 'titles' => 'UTPage|' . $somePage ) );
 26+ 'titles' => 'UTPage|' . $somePage . '|%5D' ) );
2727
2828 $this->assertArrayHasKey( 'purge', $data[0] );
 29+
2930 $this->assertArrayHasKey( 0, $data[0]['purge'] );
3031 $this->assertArrayHasKey( 'purged', $data[0]['purge'][0] );
3132 $this->assertEquals( 'UTPage', $data[0]['purge'][0]['title'] );
3233
3334 $this->assertArrayHasKey( 1, $data[0]['purge'] );
3435 $this->assertArrayHasKey( 'missing', $data[0]['purge'][1] );
35 - $this->assertEquals( $somePage, $data[0]['purge'][1]['title'] );
 36+ $this->assertEquals( $somePage, $data[0]['purge'][1]['title'] );
3637
 38+ $this->assertArrayHasKey( 2, $data[0]['purge'] );
 39+ $this->assertArrayHasKey( 'invalid', $data[0]['purge'][2] );
 40+ $this->assertEquals( '%5D', $data[0]['purge'][2]['title'] );
 41+
3742 }
3843
3944 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79477Add API purge test (mainly as proof of concept for how API tests should be wr...soxred9306:09, 2 January 2011

Status & tagging log