Make WordPress Core


Ignore:
Timestamp:
03/06/2023 05:44:15 PM (21 months ago)
Author:
hellofromTonya
Message:

Tests: Use assertSame() in Tests_Theme_wpThemeJson.

Change from assertEquals() to assertSame(). Why? To ensure both the return value and data type match the expected results.

Follow-up to [55216].

Props costdev, peterwilsoncc, mukesh27, ankitmaru.
See #56800, #57621.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/wpThemeJson.php

    r55345 r55468  
    47094709        $reflection->setAccessible( true );
    47104710
    4711         $this->assertEquals( $expected, $reflection->invoke( $theme_json, $input['css'], $input['selector'] ) );
     4711        $this->assertSame( $expected, $reflection->invoke( $theme_json, $input['css'], $input['selector'] ) );
    47124712    }
    47134713
Note: See TracChangeset for help on using the changeset viewer.