X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FRevisionTest.php;h=02a6c19d1f514007064b0c25c052c32a747a81b2;hb=aec28883207a57f9566728adc61adda09b6189f3;hp=7ee800a5f286bfc6dcaf8bd294eaafec78581f96;hpb=aae7ba949a9fc35e49c14de44605cb68b04e5f76;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/RevisionTest.php b/tests/phpunit/includes/RevisionTest.php index 7ee800a5f2..02a6c19d1f 100644 --- a/tests/phpunit/includes/RevisionTest.php +++ b/tests/phpunit/includes/RevisionTest.php @@ -281,7 +281,6 @@ class RevisionTest extends MediaWikiTestCase { * @covers \MediaWiki\Revision\RevisionStore::newMutableRevisionFromArray */ public function testConstructFromRowWithBadPageId() { - $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_NEW ); $this->overrideMwServices(); Wikimedia\suppressWarnings(); $rev = new Revision( (object)[ @@ -565,9 +564,9 @@ class RevisionTest extends MediaWikiTestCase { $row = new stdClass; $row->old_text = "Wiki est l'\xc3\xa9cole superieur !"; $row->old_flags = Revision::compressRevisionText( $row->old_text ); - $this->assertTrue( false !== strpos( $row->old_flags, 'utf-8' ), + $this->assertTrue( strpos( $row->old_flags, 'utf-8' ) !== false, "Flags should contain 'utf-8'" ); - $this->assertFalse( false !== strpos( $row->old_flags, 'gzip' ), + $this->assertFalse( strpos( $row->old_flags, 'gzip' ) !== false, "Flags should not contain 'gzip'" ); $this->assertEquals( "Wiki est l'\xc3\xa9cole superieur !", $row->old_text, "Direct check" ); @@ -588,9 +587,9 @@ class RevisionTest extends MediaWikiTestCase { $row = new stdClass; $row->old_text = "Wiki est l'\xc3\xa9cole superieur !"; $row->old_flags = Revision::compressRevisionText( $row->old_text ); - $this->assertTrue( false !== strpos( $row->old_flags, 'utf-8' ), + $this->assertTrue( strpos( $row->old_flags, 'utf-8' ) !== false, "Flags should contain 'utf-8'" ); - $this->assertTrue( false !== strpos( $row->old_flags, 'gzip' ), + $this->assertTrue( strpos( $row->old_flags, 'gzip' ) !== false, "Flags should contain 'gzip'" ); $this->assertEquals( "Wiki est l'\xc3\xa9cole superieur !", gzinflate( $row->old_text ), "Direct check" ); @@ -602,7 +601,6 @@ class RevisionTest extends MediaWikiTestCase { * @covers Revision::loadFromTitle */ public function testLoadFromTitle() { - $this->setMwGlobals( 'wgCommentTableSchemaMigrationStage', MIGRATION_NEW ); $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_OLD ); $this->overrideMwServices(); $title = $this->getMockTitle();