diff --git a/tests/phpunit/tests/passwordHash.php b/tests/phpunit/tests/user/passwordHash.php similarity index 55% rename from tests/phpunit/tests/passwordHash.php rename to tests/phpunit/tests/user/passwordHash.php index a764159e09..1179ba25b2 100644 --- a/tests/phpunit/tests/passwordHash.php +++ b/tests/phpunit/tests/user/passwordHash.php @@ -5,7 +5,7 @@ * * @covers PasswordHash */ -class Tests_PasswordHash extends WP_UnitTestCase { +class Tests_User_PasswordHash extends WP_UnitTestCase { public static function set_up_before_class() { parent::set_up_before_class(); @@ -14,22 +14,21 @@ class Tests_PasswordHash extends WP_UnitTestCase { } /** - * Tests that PasswordHash::gensalt_blowfish() does not throw a deprecation - * notice on PHP 8.1 for "Implicit conversion from float to int loses precision". + * Tests that PasswordHash::gensalt_blowfish() does not throw a deprecation notice on PHP 8.1. * - * Should this test fail, it will produce an error "E" in the results. + * The notice that we should not see: + * `Deprecated: Implicit conversion from float to int loses precision`. * * @ticket 56340 * * @covers PasswordHash::gensalt_blowfish * * @requires PHP 8.1 + * @doesNotPerformAssertions */ - public function test_gensalt_blowfish_should_not_throw_deprecation_notice_in_php81() { - $this->expectNotToPerformAssertions(); - - $hasher = new PasswordHash( 8, true ); - $hasher->gensalt_blowfish( 'a password string' ); + public function test_gensalt_blowfish_should_not_throw_deprecation_notice_on_php81() { + $hasher = new PasswordHash( 8, true ); + $hasher->gensalt_blowfish( 'a password string' ); } }