* ^--- important, causes temporary tables to be used instead of the real database
**/
-class WikiPageTest extends MediaWikiTestCase {
+class WikiPageTest extends MediaWikiLangTestCase {
var $pages_to_delete;
}
public function setUp() {
+ parent::setUp();
$this->pages_to_delete = array();
LinkCache::singleton()->clear(); # avoid cached redirect status, etc
// fail silently
}
}
+ parent::tearDown();
}
/**
$this->assertEquals( 0, $n, 'pagelinks should contain no more links from the page' );
}
+ public function testDoDeleteUpdates() {
+ $page = $this->createPage( "WikiPageTest_testDoDeleteArticle", "[[original text]] foo" );
+ $id = $page->getId();
+
+ $page->doDeleteUpdates( $id );
+
+ # ------------------------
+ $dbr = wfGetDB( DB_SLAVE );
+ $res = $dbr->select( 'pagelinks', '*', array( 'pl_from' => $id ) );
+ $n = $res->numRows();
+ $res->free();
+
+ $this->assertEquals( 0, $n, 'pagelinks should contain no more links from the page' );
+ }
+
public function testGetRevision() {
$page = $this->newPage( "WikiPageTest_testGetRevision" );