Storage: SqlBlobStore no longer needs Language object
[lhc/web/wiklou.git] / tests / phpunit / includes / RevisionTest.php
index 249fa78..bdb34a9 100644 (file)
@@ -487,7 +487,6 @@ class RevisionTest extends MediaWikiTestCase {
        public function provideGetRevisionTextWithLegacyEncoding() {
                yield 'Utf8Native' => [
                        "Wiki est l'\xc3\xa9cole superieur !",
-                       'fr',
                        'iso-8859-1',
                        (object)[
                                'old_flags' => 'utf-8',
@@ -496,7 +495,6 @@ class RevisionTest extends MediaWikiTestCase {
                ];
                yield 'Utf8Legacy' => [
                        "Wiki est l'\xc3\xa9cole superieur !",
-                       'fr',
                        'iso-8859-1',
                        (object)[
                                'old_flags' => '',
@@ -509,9 +507,9 @@ class RevisionTest extends MediaWikiTestCase {
         * @covers Revision::getRevisionText
         * @dataProvider provideGetRevisionTextWithLegacyEncoding
         */
-       public function testGetRevisionWithLegacyEncoding( $expected, $lang, $encoding, $rowData ) {
+       public function testGetRevisionWithLegacyEncoding( $expected, $encoding, $rowData ) {
                $blobStore = $this->getBlobStore();
-               $blobStore->setLegacyEncoding( $encoding, Language::factory( $lang ) );
+               $blobStore->setLegacyEncoding( $encoding );
                $this->setService( 'BlobStoreFactory', $this->mockBlobStoreFactory( $blobStore ) );
 
                $this->testGetRevisionText( $expected, $rowData );
@@ -525,7 +523,6 @@ class RevisionTest extends MediaWikiTestCase {
                 */
                yield 'Utf8NativeGzip' => [
                        "Wiki est l'\xc3\xa9cole superieur !",
-                       'fr',
                        'iso-8859-1',
                        (object)[
                                'old_flags' => 'gzip,utf-8',
@@ -534,7 +531,6 @@ class RevisionTest extends MediaWikiTestCase {
                ];
                yield 'Utf8LegacyGzip' => [
                        "Wiki est l'\xc3\xa9cole superieur !",
-                       'fr',
                        'iso-8859-1',
                        (object)[
                                'old_flags' => 'gzip',
@@ -547,11 +543,11 @@ class RevisionTest extends MediaWikiTestCase {
         * @covers Revision::getRevisionText
         * @dataProvider provideGetRevisionTextWithGzipAndLegacyEncoding
         */
-       public function testGetRevisionWithGzipAndLegacyEncoding( $expected, $lang, $encoding, $rowData ) {
+       public function testGetRevisionWithGzipAndLegacyEncoding( $expected, $encoding, $rowData ) {
                $this->checkPHPExtension( 'zlib' );
 
                $blobStore = $this->getBlobStore();
-               $blobStore->setLegacyEncoding( $encoding, Language::factory( $lang ) );
+               $blobStore->setLegacyEncoding( $encoding );
                $this->setService( 'BlobStoreFactory', $this->mockBlobStoreFactory( $blobStore ) );
 
                $this->testGetRevisionText( $expected, $rowData );
@@ -728,7 +724,7 @@ class RevisionTest extends MediaWikiTestCase {
        public function testDecompressRevisionText( $legacyEncoding, $text, $flags, $expected ) {
                $blobStore = $this->getBlobStore();
                if ( $legacyEncoding ) {
-                       $blobStore->setLegacyEncoding( $legacyEncoding, Language::factory( 'en' ) );
+                       $blobStore->setLegacyEncoding( $legacyEncoding );
                }
 
                $this->setService( 'BlobStoreFactory', $this->mockBlobStoreFactory( $blobStore ) );