From: Reedy Date: Wed, 18 Apr 2012 12:50:39 +0000 (+0100) Subject: assertEquals is $expected, $actual, not $actual, $expected X-Git-Tag: 1.31.0-rc.0~23885^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=9e33a6c7403643f83116463e858b053dc65e7528;p=lhc%2Fweb%2Fwiklou.git assertEquals is $expected, $actual, not $actual, $expected Fix Title related tests that are the wrong way round (noticed by Daniel Kinzler when creating more tests, and wondering why phpunit was making error messages that didn't make any sense!) public static function assertEquals($expected, $actual, $message = '', $delta = 0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE) Change-Id: I09aeb7cb7edb8e486ccf2f54673f91cd9704cd3b --- diff --git a/tests/phpunit/includes/TitleMethodsTest.php b/tests/phpunit/includes/TitleMethodsTest.php index 2f1103e8cb..badd04074a 100644 --- a/tests/phpunit/includes/TitleMethodsTest.php +++ b/tests/phpunit/includes/TitleMethodsTest.php @@ -21,8 +21,8 @@ class TitleMethodsTest extends MediaWikiTestCase { $titleA = Title::newFromText( $titleA ); $titleB = Title::newFromText( $titleB ); - $this->assertEquals( $titleA->equals( $titleB ), $expectedBool ); - $this->assertEquals( $titleB->equals( $titleA ), $expectedBool ); + $this->assertEquals( $expectedBool, $titleA->equals( $titleB ) ); + $this->assertEquals( $expectedBool, $titleB->equals( $titleA ) ); } public function dataInNamespace() { @@ -72,7 +72,7 @@ class TitleMethodsTest extends MediaWikiTestCase { */ public function testHasSubjectNamespace( $title, $ns, $expectedBool ) { $title = Title::newFromText( $title ); - $this->assertEquals( $title->hasSubjectNamespace( $ns ), $expectedBool ); + $this->assertEquals( $expectedBool, $title->hasSubjectNamespace( $ns ) ); } }