Make WordPress Core

Changeset 55313


Ignore:
Timestamp:
02/13/2023 02:20:30 PM (20 months ago)
Author:
SergeyBiryukov
Message:

Tests: Move PasswordHash test file to a more appropriate place.

While also used for post passwords and application passwords, the PasswordHash library appears to be initially introduced and primarily used for user passwords, so the test file can be moved to the user directory.

Follow-up to [6350], [55310].

See #56340.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/passwordHash.php

    r55312 r55313  
    66 * @covers PasswordHash
    77 */
    8 class Tests_PasswordHash extends WP_UnitTestCase {
     8class Tests_User_PasswordHash extends WP_UnitTestCase {
    99
    1010    public static function set_up_before_class() {
     
    1515
    1616    /**
    17      * Tests that PasswordHash::gensalt_blowfish() does not throw a deprecation
    18      * notice on PHP 8.1 for "Implicit conversion from float to int loses precision".
     17     * Tests that PasswordHash::gensalt_blowfish() does not throw a deprecation notice on PHP 8.1.
    1918     *
    20      * Should this test fail, it will produce an error "E" in the results.
     19     * The notice that we should not see:
     20     * `Deprecated: Implicit conversion from float to int loses precision`.
    2121     *
    2222     * @ticket 56340
     
    2525     *
    2626     * @requires PHP 8.1
     27     * @doesNotPerformAssertions
    2728     */
    28     public function test_gensalt_blowfish_should_not_throw_deprecation_notice_in_php81() {
    29             $this->expectNotToPerformAssertions();
    30 
    31             $hasher = new PasswordHash( 8, true );
    32             $hasher->gensalt_blowfish( 'a password string' );
     29    public function test_gensalt_blowfish_should_not_throw_deprecation_notice_on_php81() {
     30        $hasher = new PasswordHash( 8, true );
     31        $hasher->gensalt_blowfish( 'a password string' );
    3332    }
    3433
Note: See TracChangeset for help on using the changeset viewer.