Merge "Hide TOC with CSS instead of JavaScript"
[lhc/web/wiklou.git] / tests / phpunit / structure / ContentHandlerSanityTest.php
index 98a0fbb..c75a9d0 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use Wikimedia\TestingAccessWrapper;
+
 /**
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -29,6 +32,7 @@ class ContentHandlerSanityTest extends MediaWikiTestCase {
        }
 
        /**
+        * @coversNothing
         * @dataProvider provideHandlers
         * @param ContentHandler $handler
         */
@@ -45,9 +49,12 @@ class ContentHandlerSanityTest extends MediaWikiTestCase {
                $handlerClass = get_class( $handler );
                $contentClass = get_class( $content );
 
-               $this->assertTrue(
-                       $content->isValid(),
-                       "$handlerClass::makeEmptyContent() did not return a valid content ($contentClass::isValid())"
-               );
+               if ( $handler->supportsDirectEditing() ) {
+                       $this->assertTrue(
+                               $content->isValid(),
+                               "$handlerClass::makeEmptyContent() did not return a valid content ($contentClass::isValid())"
+                       );
+               }
        }
+
 }