Merge "Revert "Log the reason why revision->getContent() returns null""
[lhc/web/wiklou.git] / tests / phpunit / includes / parser / ParserOptionsTest.php
index 232b0bb..e2ed1d5 100644 (file)
@@ -21,7 +21,6 @@ class ParserOptionsTest extends MediaWikiTestCase {
                        'stubthreshold' => true,
                        'printable' => true,
                        'userlang' => true,
-                       'wrapclass' => true,
                ];
        }
 
@@ -67,6 +66,9 @@ class ParserOptionsTest extends MediaWikiTestCase {
                        'Non-in-key options are not ok' => [ false, [
                                'removeComments' => false,
                        ] ],
+                       'Non-in-key options are not ok (2)' => [ false, [
+                               'wrapclass' => 'foobar',
+                       ] ],
                        'Canonical override, not default (1)' => [ true, [
                                'tidy' => true,
                        ] ],
@@ -139,23 +141,6 @@ class ParserOptionsTest extends MediaWikiTestCase {
                $confstr .= '!onPageRenderingHash';
        }
 
-       // Test weird historical behavior is still weird
-       public function testOptionsHashEditSection() {
-               $popt = ParserOptions::newCanonical();
-               $popt->registerWatcher( function ( $name ) {
-                       $this->assertNotEquals( 'editsection', $name );
-               } );
-
-               $this->assertTrue( $popt->getEditSection() );
-               $this->assertSame( 'canonical', $popt->optionsHash( [] ) );
-               $this->assertSame( 'canonical', $popt->optionsHash( [ 'editsection' ] ) );
-
-               $popt->setEditSection( false );
-               $this->assertFalse( $popt->getEditSection() );
-               $this->assertSame( 'canonical', $popt->optionsHash( [] ) );
-               $this->assertSame( 'editsection=0', $popt->optionsHash( [ 'editsection' ] ) );
-       }
-
        /**
         * @expectedException InvalidArgumentException
         * @expectedExceptionMessage Unknown parser option bogus
@@ -213,7 +198,7 @@ class ParserOptionsTest extends MediaWikiTestCase {
                $wgHooks['ParserOptionsRegister'] = [];
                $this->assertSame( [
                        'dateformat', 'numberheadings', 'printable', 'stubthreshold',
-                       'thumbsize', 'userlang', 'wrapclass',
+                       'thumbsize', 'userlang'
                ], ParserOptions::allCacheVaryingOptions() );
 
                self::clearCache();
@@ -231,7 +216,7 @@ class ParserOptionsTest extends MediaWikiTestCase {
                };
                $this->assertSame( [
                        'dateformat', 'foo', 'numberheadings', 'printable', 'stubthreshold',
-                       'thumbsize', 'userlang', 'wrapclass',
+                       'thumbsize', 'userlang'
                ], ParserOptions::allCacheVaryingOptions() );
        }