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() );
55 [
'foo',
'title',
'fragment',
'' ],
56 [
null,
'title',
'fragment',
'' ],
57 [ 2.3,
'title',
'fragment',
'' ],
60 [
NS_MAIN,
null,
'fragment',
'' ],
61 [
NS_MAIN,
'',
'fragment',
'' ],
81 $this->setExpectedException(
'InvalidArgumentException' );
82 new TitleValue( $ns, $text, $fragment, $interwiki );
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() );
107 [
'Foo_Bar',
'Foo Bar' ],
117 $this->assertEquals( $text,
$title->getText() );