42 $title =
new TitleValue( $ns, $text, $fragment, $interwiki );
44 $this->assertEquals( $ns, $title->getNamespace() );
45 $this->assertTrue( $title->inNamespace( $ns ) );
46 $this->assertEquals( $text, $title->getText() );
47 $this->assertEquals( $fragment, $title->getFragment() );
48 $this->assertEquals( $hasFragment, $title->hasFragment() );
49 $this->assertEquals( $interwiki, $title->getInterwiki() );
50 $this->assertEquals( $hasInterwiki, $title->isExternal() );
97 $fragmentTitle = $title->createFragmentTarget( $fragment );
99 $this->assertEquals( $title->getNamespace(), $fragmentTitle->getNamespace() );
100 $this->assertEquals( $title->getText(), $fragmentTitle->getText() );
101 $this->assertEquals( $fragment, $fragmentTitle->getFragment() );