示例#1
0
 /**
  * Can this title be added to a user's watchlist?
  *
  * @return bool
  */
 public function isWatchable()
 {
     return !$this->isExternal() && MWNamespace::isWatchable($this->getNamespace());
 }
示例#2
0
 public function testIsWatchable()
 {
     // Specials namespaces are not watchable
     $this->assertFalse(MWNamespace::isWatchable(NS_MEDIA));
     $this->assertFalse(MWNamespace::isWatchable(NS_SPECIAL));
     // Core defined namespaces are watchables
     $this->assertTrue(MWNamespace::isWatchable(NS_MAIN));
     $this->assertTrue(MWNamespace::isWatchable(NS_TALK));
     // Additional, user defined namespaces are watchables
     $this->assertTrue(MWNamespace::isWatchable(100));
     $this->assertTrue(MWNamespace::isWatchable(101));
 }