$title = Title::newFromText( $text );
// Use the link cache since the title has already been loaded when
// the field was validated.
- $restriction = new PageRestriction( 0, $title->getArticleId() );
+ $restriction = new PageRestriction( 0, $title->getArticleID() );
$restriction->setTitle( $title );
return $restriction;
}, explode( "\n", $data['PageRestrictions'] ) );
$rev = null;
$mainPage = Title::newMainPage();
- $pageId = $mainPage ? $mainPage->getArticleId() : null;
+ $pageId = $mainPage ? $mainPage->getArticleID() : null;
if ( $pageId ) {
$rev = $dbw->selectRow(
'revision',
self::$repl['revA2'] = $this->addPage( 'A', 'A 2' );
self::$repl['revA3'] = $this->addPage( 'A', 'A 3' );
self::$repl['revA4'] = $this->addPage( 'A', 'A 4' );
- self::$repl['pageA'] = Title::newFromText( 'ApiComparePagesTest A' )->getArticleId();
+ self::$repl['pageA'] = Title::newFromText( 'ApiComparePagesTest A' )->getArticleID();
self::$repl['revB1'] = $this->addPage( 'B', 'B 1' );
self::$repl['revB2'] = $this->addPage( 'B', 'B 2' );
self::$repl['revB3'] = $this->addPage( 'B', 'B 3' );
self::$repl['revB4'] = $this->addPage( 'B', 'B 4' );
- self::$repl['pageB'] = Title::newFromText( 'ApiComparePagesTest B' )->getArticleId();
+ self::$repl['pageB'] = Title::newFromText( 'ApiComparePagesTest B' )->getArticleID();
self::$repl['revC1'] = $this->addPage( 'C', 'C 1' );
self::$repl['revC2'] = $this->addPage( 'C', 'C 2' );
self::$repl['revC3'] = $this->addPage( 'C', 'C 3' );
- self::$repl['pageC'] = Title::newFromText( 'ApiComparePagesTest C' )->getArticleId();
+ self::$repl['pageC'] = Title::newFromText( 'ApiComparePagesTest C' )->getArticleID();
$id = $this->addPage( 'D', 'D 1' );
- self::$repl['pageD'] = Title::newFromText( 'ApiComparePagesTest D' )->getArticleId();
+ self::$repl['pageD'] = Title::newFromText( 'ApiComparePagesTest D' )->getArticleID();
wfGetDB( DB_MASTER )->delete( 'revision', [ 'rev_id' => $id ] );
self::$repl['revE1'] = $this->addPage( 'E', 'E 1' );
self::$repl['revE2'] = $this->addPage( 'E', 'E 2' );
self::$repl['revE3'] = $this->addPage( 'E', 'E 3' );
self::$repl['revE4'] = $this->addPage( 'E', 'E 4' );
- self::$repl['pageE'] = Title::newFromText( 'ApiComparePagesTest E' )->getArticleId();
+ self::$repl['pageE'] = Title::newFromText( 'ApiComparePagesTest E' )->getArticleID();
wfGetDB( DB_MASTER )->update(
'page', [ 'page_latest' => 0 ], [ 'page_id' => self::$repl['pageE'] ]
);
self::$repl['revF1'] = $this->addPage( 'F', "== Section 1 ==\nF 1.1\n\n== Section 2 ==\nF 1.2" );
- self::$repl['pageF'] = Title::newFromText( 'ApiComparePagesTest F' )->getArticleId();
+ self::$repl['pageF'] = Title::newFromText( 'ApiComparePagesTest F' )->getArticleID();
self::$repl['revG1'] = $this->addPage( 'G', "== Section 1 ==\nG 1.1", CONTENT_MODEL_TEXT );
- self::$repl['pageG'] = Title::newFromText( 'ApiComparePagesTest G' )->getArticleId();
+ self::$repl['pageG'] = Title::newFromText( 'ApiComparePagesTest G' )->getArticleID();
WikiPage::factory( Title::newFromText( 'ApiComparePagesTest C' ) )
->doDeleteArticleReal( 'Test for ApiComparePagesTest' );
$this->assertSame( $toTitle->getPrefixedText(), $target->getPrefixedText() );
}
- $this->assertSame( $id, $toTitle->getArticleId() );
+ $this->assertSame( $id, $toTitle->getArticleID() );
}
/**
'to' => '[',
] );
} finally {
- $this->assertSame( $id, Title::newFromText( $name )->getArticleId() );
+ $this->assertSame( $id, Title::newFromText( $name )->getArticleID() );
}
}
'to' => "$name 3",
] );
} finally {
- $this->assertSame( $id, Title::newFromText( "$name 2" )->getArticleId() );
+ $this->assertSame( $id, Title::newFromText( "$name 2" )->getArticleID() );
$this->assertFalse( Title::newFromText( "$name 3" )->exists(),
"\"$name 3\" should not exist" );
}
'tags' => 'custom tag',
] );
} finally {
- $this->assertSame( $id, Title::newFromText( $name )->getArticleId() );
+ $this->assertSame( $id, Title::newFromText( $name )->getArticleID() );
$this->assertFalse( Title::newFromText( "$name 2" )->exists(),
"\"$name 2\" should not exist" );
}
] );
$this->assertMoved( $name, "$name 2", $id );
- $this->assertSame( $talkId, Title::newFromText( "Talk:$name" )->getArticleId() );
+ $this->assertSame( $talkId, Title::newFromText( "Talk:$name" )->getArticleID() );
$this->assertSame( $talkDestinationId,
- Title::newFromText( "Talk:$name 2" )->getArticleId() );
+ Title::newFromText( "Talk:$name 2" )->getArticleID() );
$this->assertSame( [ [
'message' => 'articleexists',
'params' => [],
}
$this->assertSame( $ids["$name/error"],
- Title::newFromText( "$name/error" )->getArticleId() );
+ Title::newFromText( "$name/error" )->getArticleID() );
$this->assertSame( $ids["$name 2/error"],
- Title::newFromText( "$name 2/error" )->getArticleId() );
+ Title::newFromText( "$name 2/error" )->getArticleID() );
$results = array_merge( $res[0]['move']['subpages'], $res[0]['move']['subpages-talk'] );
foreach ( $results as $arr ) {
'to' => "$name 2",
], null, $user );
} finally {
- $this->assertSame( $id, Title::newFromText( "$name" )->getArticleId() );
+ $this->assertSame( $id, Title::newFromText( "$name" )->getArticleID() );
$this->assertFalse( Title::newFromText( "$name 2" )->exists(),
"\"$name 2\" should not exist" );
}
] );
$this->assertMoved( "Talk:$name", $name, $idBase );
- $this->assertSame( $idSub, Title::newFromText( "Talk:$name/1" )->getArticleId() );
+ $this->assertSame( $idSub, Title::newFromText( "Talk:$name/1" )->getArticleID() );
$this->assertFalse( Title::newFromText( "$name/1" )->exists(),
"\"$name/1\" should not exist" );
$restriction = new $class( 1, 1 );
$title = \Title::newFromId( 1 );
- $this->assertEquals( $title->getArticleId(), $restriction->getTitle()->getArticleId() );
+ $this->assertEquals( $title->getArticleID(), $restriction->getTitle()->getArticleID() );
}
public function testNewFromRow() {
$restriction = $restrictions[0];
$this->assertEquals( $page->getId(), $restriction->getValue() );
- $this->assertEquals( $page->getId(), $restriction->getTitle()->getArticleId() );
+ $this->assertEquals( $page->getId(), $restriction->getTitle()->getArticleID() );
$this->assertEquals( $title->getDBKey(), $restriction->getTitle()->getDBKey() );
$this->assertEquals( $title->getNamespace(), $restriction->getTitle()->getNamespace() );