!! Version 2 !! article Main Page !! text [[Category:Test pages]] !! endarticle !! article Test page !! text [[Category:Test pages]] !! endarticle !! article Other page !! text [[Category:Test pages]] !! endarticle !! article Category:Test pages !! text [[Category:Test categories]] !! endarticle !! article Test default sort key !! text {{#phptag: echo WPage::$defaultSortKey === false ? 'false' : 'true'; }} {{#phptag: WPage::$defaultSortKey = 'Sort key page'; }} [[Category:Test pages]] {{#phptag: echo WPage::$defaultSortKey === false ? 'false' : 'true'; }} !! endarticle !! test WStats::USERS !! options disabled !! wikitext echo WStats::USERS > 0 ? 'true' : 'false'; !! html

true

!! end !! test WStats::PAGES !! wikitext echo WStats::PAGES > 0 ? 'true' : 'false'; !! html

true

!! end !! test WPage::TITLE !! options title=[[User:Ævar Arnfjörð Bjarmason]] !! wikitext {{#phptag: WPage::TITLE }} !! html

User:Ævar Arnfjörð Bjarmason

!! end !! test WPage::TITLE->name !! options title=[[User:Ævar Arnfjörð Bjarmason]] !! wikitext {{#phptag: WPage::TITLE->name }} !! html

Ævar Arnfjörð Bjarmason

!! end !! test WPage::TITLE->talkNsText !! wikitext {{#phptag: WPage::TITLE->talkNsText }} !! html

Talk

!! end !! test WCategory->pageCount Test pages !! wikitext $c = new WCategory( 'Test pages' ); echo $c->pageCount; !! html

4

!! end !! test WCategory->subcatCount !! wikitext $c = new WCategory( 'Test categories' ); echo $c->subcatCount; !! html

1

!! end !! test Test default sort key !! wikitext {{:Test default sort key}} !! html

false true

!! end !! test WPage::addCategory foo !! wikitext WPage::addCategory( 'Foo' ); !! html !! end !! test WPage::addCategory foo bar !! wikitext WPage::addCategory( ['foo', 'bar'] ); !! html !! end !! test WPage::addCategory WCategory bar !! wikitext WPage::addCategory( new WCategory( 'bar' ) ); !! html !! end !! article WTitle ID !! text if ( WTitle::ID > 0 ) { echo 'pass WTitle::ID', "\n\n"; } $t = new WTitle('Test pages', NS_CATEGORY); if ( $t->ID > 0 && $t->ID != WTitle::ID ) { echo 'pass WTitle->ID', "\n\n"; } !! endarticle !! test Test WTitle ID !! wikitext $t1 = new WTitle( 'Test pages', NS_CATEGORY ); $t2 = new WTitle( 'Category:Test pages' ); if ( $t1->ID > 0 ) { echo 'pass1, it is ok', "\n\n"; } if ( $t1->ID == $t2->ID ) { echo 'pass2, it is ok', "\n\n"; } !! html

pass1, it is ok

pass2, it is ok


!! end !! test Test W::MAIN_PAGE !! wikitext echo W::MAIN_PAGE; !! html

Main Page

!! end