worthwhile tests in testTitleObjectStringConversion
authorAntoine Musso <hashar@free.fr>
Fri, 7 Dec 2012 15:39:39 +0000 (16:39 +0100)
committerAntoine Musso <hashar@free.fr>
Fri, 7 Dec 2012 15:39:39 +0000 (16:39 +0100)
The previous tests were not reflecting their comment, I have tweaked the
assertions a bit to actually test something that reflect the comments.

Change-Id: Ie1764ee1a218ead0169958704ba8625ab8d56445

tests/phpunit/includes/SampleTest.php

index 45ea555..88bbc07 100644 (file)
@@ -35,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");
        }
 
        /**