Make WordPress Core

Changeset 64825


Ignore:
Timestamp:
10/27/2026 07:36:35 PM (3 days ago)
Author:
lancewillett
Message:

Tests: Use strict inequality for unique filenames.

Use assertNotSame() when comparing the two filename strings returned by wp_unique_filename(). Preserve the checks that both files can be created and written.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/14857

Props hmbashar, mukesh27.
See #64895.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/file.php

    r64745 r64825  
    5858
    5959                // The two should be different.
    60                 $this->assertNotEquals( $filename1, $filename2 );
     60                $this->assertNotSame( $filename1, $filename2 );
    6161
    6262                unlink( $this->dir . DIRECTORY_SEPARATOR . $filename1 );
Note: See TracChangeset for help on using the changeset viewer.