Exemplo n.º 1
0
 public function testCommonMethods()
 {
     $ns = Localizer::getInstance()->getNamespaceTextById(NS_CATEGORY);
     $class = new DIWikiPage('Foo', NS_CATEGORY);
     $instance = new ClassDescription($class);
     $this->assertEquals(array($class), $instance->getCategories());
     $this->assertEquals("[[{$ns}:Foo]]", $instance->getQueryString());
     $this->assertEquals(" <q>[[{$ns}:Foo]]</q> ", $instance->getQueryString(true));
     $this->assertEquals(false, $instance->isSingleton());
     $this->assertEquals(array(), $instance->getPrintRequests());
     $this->assertEquals(1, $instance->getSize());
     $this->assertEquals(0, $instance->getDepth());
     $this->assertEquals(2, $instance->getQueryFeatures());
 }