}
throw new UnexpectedValueException( "callback '$cb' is not callable" );
}
- call_user_func( $cb, $info['credits'][$name] );
+ $cb( $info['credits'][$name] );
}
}
* @since 1.33
*/
public function setAttributeForTest( $name, array $value ) {
+ // @codeCoverageIgnoreStart
if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
throw new RuntimeException( __METHOD__ . ' can only be used in tests' );
}
+ // @codeCoverageIgnoreEnd
if ( isset( $this->testAttributes[$name] ) ) {
throw new Exception( "The attribute '$name' has already been overridden" );
}