Exemplo n.º 1
0
 /**
  * Returns true if the title has the same subject namespace as the
  * namespace specified.
  * For example this method will take NS_USER and return true if namespace
  * is either NS_USER or NS_USER_TALK since both of them have NS_USER
  * as their subject namespace.
  *
  * This is MUCH simpler than individually testing for equivalence
  * against both NS_USER and NS_USER_TALK, and is also forward compatible.
  * @since 1.19
  * @param int $ns
  * @return bool
  */
 public function hasSubjectNamespace($ns)
 {
     return MWNamespace::subjectEquals($this->getNamespace(), $ns);
 }
Exemplo n.º 2
0
 function assertDifferentSubject($ns1, $ns2, $msg = '')
 {
     $this->assertFalse(MWNamespace::subjectEquals($ns1, $ns2, $msg));
 }