Index: trunk/phase3/maintenance/tests/phpunit/includes/api/ApiWatchTest.php |
— | — | @@ -193,14 +193,17 @@ |
194 | 194 | $data = $this->doApiRequest( array( |
195 | 195 | 'action' => 'rollback', |
196 | 196 | 'title' => 'Main Page', |
197 | | - 'user' => self::$user->userName, |
| 197 | + 'user' => $pageinfo['user'], |
198 | 198 | 'token' => $pageinfo['rollbacktoken'], |
199 | 199 | 'watchlist' => 'watch' ), $data ); |
200 | 200 | } catch( UsageException $ue ) { |
201 | 201 | if( $ue->getCodeString() == 'onlyauthor' ) { |
202 | 202 | $this->markTestIncomplete( "Only one author to 'Main Page', cannot test rollback" ); |
| 203 | + } else { |
| 204 | + $this->fail( "Received error " . $ue->getCodeString() ); |
203 | 205 | } |
204 | 206 | } |
| 207 | + |
205 | 208 | $this->assertArrayHasKey( 'rollback', $data[0] ); |
206 | 209 | $this->assertArrayHasKey( 'title', $data[0]['rollback'] ); |
207 | 210 | } |