From: Max Semenik Date: Wed, 2 Jan 2019 08:21:13 +0000 (-0800) Subject: Unbreak Pbkdf2PasswordTest X-Git-Tag: 1.34.0-rc.0~3158^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=9c5174669eecd1b8729e99b0d96750db26bf94f6;p=lhc%2Fweb%2Fwiklou.git Unbreak Pbkdf2PasswordTest Due to https://github.com/sebastianbergmann/phpunit/issues/3459 it was looking for a wrong function name and was skipping the test even when PHP support was present. Change-Id: I2508f192a76275286e95bd6a06e4628d98b11737 --- diff --git a/tests/phpunit/includes/password/Pbkdf2PasswordTest.php b/tests/phpunit/includes/password/Pbkdf2PasswordTest.php index 9e8b830ff3..b9b1ef6a2d 100644 --- a/tests/phpunit/includes/password/Pbkdf2PasswordTest.php +++ b/tests/phpunit/includes/password/Pbkdf2PasswordTest.php @@ -5,9 +5,17 @@ * @covers Pbkdf2Password * @covers Password * @covers ParameterizedPassword - * @requires function hash_pbkdf2 */ class Pbkdf2PasswordTest extends PasswordTestCase { + public function setUp() { + parent::setUp(); + // Can't be done with annotations due to + // https://github.com/sebastianbergmann/phpunit/issues/3459 + if ( !function_exists( 'hash_pbkdf2' ) ) { + $this->markTestSkipped( 'function hash_pbkdf2 is required' ); + } + } + protected function getTypeConfigs() { return [ 'pbkdf2' => [ 'class' => Pbkdf2Password::class,