Merge "add lbzip2 output processor for exports"
[lhc/web/wiklou.git] / tests / phpunit / structure / SpecialPageFatalTest.php
index 9d85fde..97797ca 100644 (file)
@@ -11,19 +11,9 @@ use MediaWiki\MediaWikiServices;
  *
  * @since 1.32
  * @author Addshore
+ * @coversNothing
  */
 class SpecialPageFatalTest extends MediaWikiTestCase {
-
-       public static function setUpBeforeClass() {
-               parent::setUpBeforeClass();
-               self::overrideMwServices();
-       }
-
-       public static function tearDownAfterClass() {
-               self::overrideMwServices();
-               parent::tearDownAfterClass();
-       }
-
        public function provideSpecialPages() {
                $specialPages = [];
                $spf = MediaWikiServices::getInstance()->getSpecialPageFactory();
@@ -42,8 +32,14 @@ class SpecialPageFatalTest extends MediaWikiTestCase {
 
                try {
                        $executor->executeSpecialPage( $page, '', null, null, $user );
+               } catch ( \PHPUnit\Framework\Error\Error $error ) {
+                       // Let phpunit settings working:
+                       // - convertErrorsToExceptions="true"
+                       // - convertNoticesToExceptions="true"
+                       // - convertWarningsToExceptions="true"
+                       throw $error;
                } catch ( Exception $e ) {
-                       // Exceptions are allowed
+                       // Other exceptions are allowed
                }
 
                // If the page fataled phpunit will have already died