r111387 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111386‎ | r111387 | r111388 >
Date:16:38, 13 February 2012
Author:ialex
Status:ok
Tags:
Comment:
Use WikiPage instead of Article to call doDeleteArticle
Modified paths:
  • /trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php
@@ -228,8 +228,8 @@
229229
230230 $talk = $this->user->user->getTalkPage();
231231 if ( $talk->exists() ) {
232 - $a = new Article( $talk );
233 - $a->doDeleteArticle( '' );
 232+ $page = WikiPage::factory( $talk );
 233+ $page->doDeleteArticle( '' );
234234 }
235235
236236 $this->assertFalse( (bool)$talk->getArticleId( Title::GAID_FOR_UPDATE ), 'User talk does not exist' );
@@ -341,8 +341,8 @@
342342 $file = wfFindFile( $name, array( 'ignoreRedirect' => true ) );
343343 $empty = "";
344344 FileDeleteForm::doDelete( $t, $file, $empty, "none", true );
345 - $a = new Article ( $t );
346 - $a->doDeleteArticle( "testing" );
 345+ $page = WikiPage::factory( $t );
 346+ $page->doDeleteArticle( "testing" );
347347 }
348348 $t = Title::newFromText( $name, NS_FILE );
349349

Status & tagging log