- public function testGetTalkPage_special( $ns ) {
- $this->setExpectedException( MWException::class,
- "NamespaceInfo::getTalk does not make any sense for given namespace $ns" );
- $this->newObj()->getTalkPage( new TitleValue( $ns, 'A' ) );
+ public function testGetAssociated_special( $ns ) {
+ $this->setExpectedException(
+ MWException::class,
+ "NamespaceInfo::getAssociated does not make any sense for given namespace $ns"
+ );
+ $this->newObj()->getAssociated( $ns );
+ }
+
+ public static function provideCanHaveTalkPage() {
+ return [
+ [ new TitleValue( NS_MAIN, 'Test' ), true ],
+ [ new TitleValue( NS_TALK, 'Test' ), true ],
+ [ new TitleValue( NS_USER, 'Test' ), true ],
+ [ new TitleValue( NS_SPECIAL, 'Test' ), false ],
+ [ new TitleValue( NS_MEDIA, 'Test' ), false ],
+ [ new TitleValue( NS_MAIN, '', 'Kittens' ), false ],
+ [ new TitleValue( NS_MAIN, 'Kittens', '', 'acme' ), false ],
+ ];