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:
parent
563bacc147
commit
92b4b7340b
1 changed files with 3 additions and 4 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue