Make WordPress Core


Ignore:
Timestamp:
02/10/2021 01:24:24 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use assertSame() in some newly introduced tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using assertSame() should generally be preferred to assertEquals() where appropriate, to make the tests more reliable.

Follow-up to [49904], [49925], [49992], [50012], [50013], [50065], [50075], [50131], [50150], [50157].

See #38266, #52482.

File:
1 edited

Legend:

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

    r50065 r50284  
    469469            'Application passwords should be allowed for API authentication'
    470470        );
    471         $this->assertEquals( $item['uuid'], rest_get_authenticated_app_password() );
     471        $this->assertSame( $item['uuid'], rest_get_authenticated_app_password() );
    472472    }
    473473
Note: See TracChangeset for help on using the changeset viewer.