Siebrand has uploaded a new change for review. https://gerrit.wikimedia.org/r/276048
Change subject: MediaWikiTestCase::assertException() was removed ...................................................................... MediaWikiTestCase::assertException() was removed Deprecated since 1.22. No uses in core or Gerrit extensions remaining. Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9 --- M RELEASE-NOTES-1.27 M tests/phpunit/MediaWikiTestCase.php 2 files changed, 1 insertion(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/48/276048/1 diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index 163c026..9dfde84 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -235,6 +235,7 @@ * Language::getLanguageNames() was removed (deprecated since 1.20). * Language::getTranslatedLanguageNames() was removed (deprecated since 1.20). * Language::specialPage() was removed (deprecated since 1.24). +* MediaWikiTestCase::assertException() was removed (deprecated since 1.22). * OutputPage::getHeadItems() was removed (deprecated since 1.24). * OutputPage::getScript() was removed (deprecated since 1.24). * OutputPage::out() was removed (deprecated since 1.22). diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index d5192ac..a574121 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -1150,33 +1150,6 @@ } /** - * Asserts that an exception of the specified type occurs when running - * the provided code. - * - * @since 1.21 - * @deprecated since 1.22 Use setExpectedException - * - * @param callable $code - * @param string $expected - * @param string $message - */ - protected function assertException( $code, $expected = 'Exception', $message = '' ) { - $pokemons = null; - - try { - call_user_func( $code ); - } catch ( Exception $pokemons ) { - // Gotta Catch 'Em All! - } - - if ( $message === '' ) { - $message = 'An exception of type "' . $expected . '" should have been thrown'; - } - - $this->assertInstanceOf( $expected, $pokemons, $message ); - } - - /** * Asserts that the given string is a valid HTML snippet. * Wraps the given string in the required top level tags and * then calls assertValidHtmlDocument(). -- To view, visit https://gerrit.wikimedia.org/r/276048 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icae4077078c73d766d3c1c9e9e569922151296d9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Siebrand <siebr...@kitano.nl> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits