X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FPHPUnit4And6Compat.php;h=672ab4a4d650d6c0bf79b6488cd7be27d5564fd3;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hp=ac2c4f5a2629f8c90dfb0b15b0608648d9a69737;hpb=d564a821628b2ac03b6b5cbaa761409d17e82dfa;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/PHPUnit4And6Compat.php b/tests/phpunit/PHPUnit4And6Compat.php index ac2c4f5a26..672ab4a4d6 100644 --- a/tests/phpunit/PHPUnit4And6Compat.php +++ b/tests/phpunit/PHPUnit4And6Compat.php @@ -30,7 +30,9 @@ trait PHPUnit4And6Compat { */ public function setExpectedException( $name, $message = '', $code = null ) { if ( is_callable( [ $this, 'expectException' ] ) ) { - $this->expectException( $name ); + if ( $name !== null ) { + $this->expectException( $name ); + } if ( $message !== '' ) { $this->expectExceptionMessage( $message ); }