From: Niklas Laxström Date: Tue, 1 Apr 2014 11:59:46 +0000 (+0000) Subject: Fix order of expected, actual in some tests X-Git-Tag: 1.31.0-rc.0~16413^2 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=da73cf89d7bd002866291dd2461cc9f78d9f9d07;p=lhc%2Fweb%2Fwiklou.git Fix order of expected, actual in some tests Change-Id: Iabd431517586c06d411a0894e5d3621a4c4ddf05 --- diff --git a/tests/phpunit/includes/api/ApiEditPageTest.php b/tests/phpunit/includes/api/ApiEditPageTest.php index ac3f1cde37..2e1c265a86 100644 --- a/tests/phpunit/includes/api/ApiEditPageTest.php +++ b/tests/phpunit/includes/api/ApiEditPageTest.php @@ -215,7 +215,7 @@ class ApiEditPageTest extends ApiTestCase { $newtext = WikiPage::factory( Title::newFromText( $name ) ) ->getContent( Revision::RAW ) ->getNativeData(); - $this->assertEquals( $newtext, "==section 1==\nnew content 1\n\n==section 2==\ncontent2" ); + $this->assertEquals( "==section 1==\nnew content 1\n\n==section 2==\ncontent2", $newtext ); // Test that we raise a 'nosuchsection' error try { @@ -227,7 +227,7 @@ class ApiEditPageTest extends ApiTestCase { ) ); $this->fail( "Should have raised a UsageException" ); } catch ( UsageException $e ) { - $this->assertEquals( $e->getCodeString(), 'nosuchsection' ); + $this->assertEquals( 'nosuchsection', $e->getCodeString() ); } } @@ -255,7 +255,7 @@ class ApiEditPageTest extends ApiTestCase { $text = WikiPage::factory( Title::newFromText( $name ) ) ->getContent( Revision::RAW ) ->getNativeData(); - $this->assertEquals( $text, "== header ==\n\ntest" ); + $this->assertEquals( "== header ==\n\ntest", $text ); // Now on one that does $this->assertTrue( Title::newFromText( $name )->exists() ); @@ -271,7 +271,7 @@ class ApiEditPageTest extends ApiTestCase { $text = WikiPage::factory( Title::newFromText( $name ) ) ->getContent( Revision::RAW ) ->getNativeData(); - $this->assertEquals( $text, "== header ==\n\ntest\n\n== header ==\n\ntest" ); + $this->assertEquals( "== header ==\n\ntest\n\n== header ==\n\ntest", $text ); } public function testEditConflict() {