worthwhile tests in testTitleObjectStringConversion

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
This commit is contained in:
Antoine Musso 2012-12-07 16:39:39 +01:00
parent 563bacc147
commit 92b4b7340b

View 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");
}
/**