X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fspecials%2FSpecialPageExecutor.php;h=abb0d11dbc2d72c41926c9bd1613bc1ded2509bd;hp=e7cfca7f01b6ff699d60cac9841875b50dfa3df4;hb=9c7f6734c397a954b8eaa5ec73876f2b4bf92afb;hpb=d84c3dde5af90c5c3497d18e427a5c2a38ac6ca8 diff --git a/tests/phpunit/includes/specials/SpecialPageExecutor.php b/tests/phpunit/includes/specials/SpecialPageExecutor.php index e7cfca7f01..abb0d11dbc 100644 --- a/tests/phpunit/includes/specials/SpecialPageExecutor.php +++ b/tests/phpunit/includes/specials/SpecialPageExecutor.php @@ -73,6 +73,9 @@ class SpecialPageExecutor { $this->setEditTokenFromUser( $context ); + // Make sure the skin context is correctly set https://phabricator.wikimedia.org/T200771 + $context->getSkin()->setContext( $context ); + return $context; } @@ -114,15 +117,10 @@ class SpecialPageExecutor { } else { $html = $output->getHTML(); } - } catch ( Exception $ex ) { + } finally { ob_end_clean(); - - // Re-throw exception after "finally" handling because PHP 5.3 doesn't have "finally". - throw $ex; } - ob_end_clean(); - return $html; }