Index: trunk/phase3/tests/phpunit/includes/api/ApiPurgeTest.php |
— | — | @@ -22,17 +22,22 @@ |
23 | 23 | |
24 | 24 | $data = $this->doApiRequest( array( |
25 | 25 | 'action' => 'purge', |
26 | | - 'titles' => 'UTPage|' . $somePage ) ); |
| 26 | + 'titles' => 'UTPage|' . $somePage . '|%5D' ) ); |
27 | 27 | |
28 | 28 | $this->assertArrayHasKey( 'purge', $data[0] ); |
| 29 | + |
29 | 30 | $this->assertArrayHasKey( 0, $data[0]['purge'] ); |
30 | 31 | $this->assertArrayHasKey( 'purged', $data[0]['purge'][0] ); |
31 | 32 | $this->assertEquals( 'UTPage', $data[0]['purge'][0]['title'] ); |
32 | 33 | |
33 | 34 | $this->assertArrayHasKey( 1, $data[0]['purge'] ); |
34 | 35 | $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'] ); |
36 | 37 | |
| 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 | + |
37 | 42 | } |
38 | 43 | |
39 | 44 | } |