+ /**
+ * Future-compatible layer for PHPUnit 4's setExpectedException.
+ */
+ public function expectException( $exception ) {
+ if ( is_callable( 'parent::expectException' ) ) {
+ parent::expectException( $exception );
+ return;
+ }
+
+ parent::setExpectedException( $exception );
+ }
+