From: Stanislav Malyshev Date: Wed, 15 Feb 2017 23:15:41 +0000 (-0800) Subject: Check that empty content is valid only on handlers that allow direct editing. X-Git-Tag: 1.31.0-rc.0~4073^2 X-Git-Url: http://git.cyclocoop.org/data/Luca_Pacioli_%28Gemaelde%29.jpeg?a=commitdiff_plain;h=85fd9d4fb4515d621a0a450dad8bd7f1cc19dd71;p=lhc%2Fweb%2Fwiklou.git Check that empty content is valid only on handlers that allow direct editing. Bug: T157626 Change-Id: I843f25172b70111f8219eec9a853ac3138c6aff3 --- diff --git a/tests/phpunit/structure/ContentHandlerSanityTest.php b/tests/phpunit/structure/ContentHandlerSanityTest.php index 98a0fbbfd5..30bae78ce3 100644 --- a/tests/phpunit/structure/ContentHandlerSanityTest.php +++ b/tests/phpunit/structure/ContentHandlerSanityTest.php @@ -45,9 +45,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())" + ); + } } + }