Index: trunk/phase3/tests/phpunit/includes/SampleTest.php |
— | — | @@ -88,7 +88,7 @@ |
89 | 89 | * See http://www.phpunit.de/manual/3.4/en/appendixes.annotations.html#appendixes.annotations.expectedException |
90 | 90 | */ |
91 | 91 | function testTitleObjectFromObject() { |
92 | | - $title = Title::newFromText( new Title( "test" ) ); |
| 92 | + $title = Title::newFromText( Title::newFromText( "test" ) ); |
93 | 93 | $this->assertEquals( "Test", $title->isLocal() ); |
94 | 94 | } |
95 | 95 | } |
Index: trunk/phase3/tests/phpunit/includes/parser/TagHooks.php |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | $parser = new Parser( $wgParserConf ); |
23 | 23 | |
24 | 24 | $parser->setHook( $tag, array( $this, 'tagCallback' ) ); |
25 | | - $parserOutput = $parser->parse( "Foo<$tag>Bar</$tag>Baz", new Title( 'Test' ), new ParserOptions ); |
| 25 | + $parserOutput = $parser->parse( "Foo<$tag>Bar</$tag>Baz", Title::newFromText( 'Test' ), new ParserOptions ); |
26 | 26 | $this->assertEquals( "<p>FooOneBaz\n</p>", $parserOutput->getText() ); |
27 | 27 | |
28 | 28 | $parser->mPreprocessor = null; # Break the Parser <-> Preprocessor cycle |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | $parser = new Parser( $wgParserConf ); |
38 | 38 | |
39 | 39 | $parser->setHook( $tag, array( $this, 'tagCallback' ) ); |
40 | | - $parser->parse( "Foo<$tag>Bar</$tag>Baz", new Title( 'Test' ), new ParserOptions ); |
| 40 | + $parser->parse( "Foo<$tag>Bar</$tag>Baz", Title::newFromText( 'Test' ), new ParserOptions ); |
41 | 41 | $this->fail('Exception not thrown.'); |
42 | 42 | } |
43 | 43 | |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | $parser = new Parser( $wgParserConf ); |
50 | 50 | |
51 | 51 | $parser->setFunctionTagHook( $tag, array( $this, 'functionTagCallback' ), 0 ); |
52 | | - $parserOutput = $parser->parse( "Foo<$tag>Bar</$tag>Baz", new Title( 'Test' ), new ParserOptions ); |
| 52 | + $parserOutput = $parser->parse( "Foo<$tag>Bar</$tag>Baz", Title::newFromText( 'Test' ), new ParserOptions ); |
53 | 53 | $this->assertEquals( "<p>FooOneBaz\n</p>", $parserOutput->getText() ); |
54 | 54 | |
55 | 55 | $parser->mPreprocessor = null; # Break the Parser <-> Preprocessor cycle |
— | — | @@ -63,7 +63,7 @@ |
64 | 64 | $parser = new Parser( $wgParserConf ); |
65 | 65 | |
66 | 66 | $parser->setFunctionTagHook( $tag, array( $this, 'functionTagCallback' ), SFH_OBJECT_ARGS ); |
67 | | - $parser->parse( "Foo<$tag>Bar</$tag>Baz", new Title( 'Test' ), new ParserOptions ); |
| 67 | + $parser->parse( "Foo<$tag>Bar</$tag>Baz", Title::newFromText( 'Test' ), new ParserOptions ); |
68 | 68 | $this->fail('Exception not thrown.'); |
69 | 69 | } |
70 | 70 | |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -78,9 +78,8 @@ |
79 | 79 | |
80 | 80 | /** |
81 | 81 | * Constructor |
82 | | - * @private |
83 | 82 | */ |
84 | | - /* private */ function __construct() { } |
| 83 | + protected function __construct() { } |
85 | 84 | |
86 | 85 | /** |
87 | 86 | * Create a new Title from a prefixed DB key |