Make WordPress Core


Ignore:
Timestamp:
10/07/2022 01:02:07 AM (20 months ago)
Author:
desrosj
Message:

Tests: Replace some occurrences of assertEquals() with assertSame().

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

Props costdev, desrosj.
See #55654.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-global-styles-controller.php

    r54058 r54402  
    372372        $links    = $response->get_links();
    373373
    374         $this->assertEquals(
     374        $this->assertEqualSets(
    375375            array(
    376376                'id'       => self::$global_styles_id,
     
    410410        $response = rest_get_server()->dispatch( $request );
    411411        $data     = $response->get_data();
    412         $this->assertEquals( 'My new global styles title', $data['title']['raw'] );
     412        $this->assertSame( 'My new global styles title', $data['title']['raw'] );
    413413    }
    414414
Note: See TracChangeset for help on using the changeset viewer.