From d417de70fcf39e0a7a15ba780b597914d16ca0f7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 12 Mar 2014 18:12:23 +0100 Subject: Update to MediaWiki 1.22.4 --- tests/phpunit/includes/MWExceptionHandlerTest.php | 73 ----------------------- 1 file changed, 73 deletions(-) delete mode 100644 tests/phpunit/includes/MWExceptionHandlerTest.php (limited to 'tests/phpunit/includes/MWExceptionHandlerTest.php') diff --git a/tests/phpunit/includes/MWExceptionHandlerTest.php b/tests/phpunit/includes/MWExceptionHandlerTest.php deleted file mode 100644 index 987dfa83..00000000 --- a/tests/phpunit/includes/MWExceptionHandlerTest.php +++ /dev/null @@ -1,73 +0,0 @@ -getTrace(); - $hasObject = false; - $hasArray = false; - foreach ( $trace as $frame ) { - if ( ! isset( $frame['args'] ) ) { - continue; - } - foreach ( $frame['args'] as $arg ) { - $hasObject = $hasObject || is_object( $arg ); - $hasArray = $hasArray || is_array( $arg ); - } - - if( $hasObject && $hasArray ) { - break; - } - } - $this->assertTrue( $hasObject, - "The stacktrace must have a function having an object has parameter" ); - $this->assertTrue( $hasArray, - "The stacktrace must have a function having an array has parameter" ); - - # Now we redact the trace.. and make sure no function arguments are - # arrays or objects. - $redacted = MWExceptionHandler::getRedactedTrace( $e ); - - foreach ( $redacted as $frame ) { - if ( ! isset( $frame['args'] ) ) { - continue; - } - foreach ( $frame['args'] as $arg ) { - $this->assertNotInternalType( 'array', $arg); - $this->assertNotInternalType( 'object', $arg); - } - } - } - - /** - * Helper function for testExpandArgumentsInCall - * - * Pass it an object and an array :-) - * - * @throws Exception - */ - protected static function helperThrowAnException( $a, $b ) { - throw new Exception(); - } -} -- cgit v1.2.3-54-g00ecf