Merge "ParserOutput::addLanguageLink needs a string"
[lhc/web/wiklou.git] / tests / phpunit / includes / SampleTest.php
index 2f55de4..88bbc07 100644 (file)
@@ -15,6 +15,7 @@ class TestSample extends MediaWikiLangTestCase {
                // after each test.
                $this->setMwGlobals( array(
                        'wgContLang' => Language::factory( 'en' ),
+                       'wgLanguageCode' => 'en',
                ) );
        }
 
@@ -26,7 +27,7 @@ class TestSample extends MediaWikiLangTestCase {
        }
 
        /**
-        * Name tests so that PHPUnit can turn them into sentances when
+        * Name tests so that PHPUnit can turn them into sentences when
         * they run.  While MediaWiki isn't strictly an Agile Programming
         * project, you are encouraged to use the naming described under
         * "Agile Documentation" at
@@ -34,12 +35,11 @@ class TestSample extends MediaWikiLangTestCase {
         */
        function testTitleObjectStringConversion() {
                $title = Title::newFromText("text");
-               $this->assertEquals("Text", $title->__toString(), "Title creation");
-               $this->assertEquals("Text", "Text", "Automatic string conversion");
+               $this->assertInstanceOf('Title', $title, "Title creation");
+               $this->assertEquals("Text", $title, "Automatic string conversion");
 
                $title = Title::newFromText("text", NS_MEDIA);
-               $this->assertEquals("Media:Text", $title->__toString(), "Title creation with namespace");
-
+               $this->assertEquals("Media:Text", $title, "Title creation with namespace");
        }
 
        /**