/** creates a title object and its article object */
protected function setUp() {
+ parent::setUp();
$this->title = Title::makeTitle( NS_MAIN, 'SomePage' );
$this->article = new Article( $this->title );
-
}
/** cleanup title object and its article object */
protected function tearDown() {
+ parent::tearDown();
$this->title = null;
$this->article = null;
-
}
function testImplementsGetMagic() {
$this->article->ext_someNewProperty = 12;
$this->assertEquals( 12, $this->article->ext_someNewProperty,
"Article get/set magic on new field" );
-
+
$this->article->ext_someNewProperty = -8;
$this->assertEquals( -8, $this->article->ext_someNewProperty,
"Article get/set magic on update to new field" );
function testStaticFunctions() {
$this->hideDeprecated( 'Article::getAutosummary' );
$this->hideDeprecated( 'WikiPage::getAutosummary' );
+ $this->hideDeprecated( 'CategoryPage::getAutosummary' ); // Inherited from Article
$this->assertEquals( WikiPage::selectFields(), Article::selectFields(),
"Article static functions" );
$title = Title::makeTitle( NS_FILE, 'Someimage.png' );
$page = WikiPage::factory( $title );
$this->assertEquals( 'WikiFilePage', get_class( $page ) );
-
+
$title = Title::makeTitle( NS_CATEGORY, 'SomeCategory' );
$page = WikiPage::factory( $title );
$this->assertEquals( 'WikiCategoryPage', get_class( $page ) );
-
+
$title = Title::makeTitle( NS_MAIN, 'SomePage' );
$page = WikiPage::factory( $title );
$this->assertEquals( 'WikiPage', get_class( $page ) );