Make WordPress Core


Ignore:
Timestamp:
01/03/2026 06:15:57 AM (3 months ago)
Author:
westonruter
Message:

Code Modernization: Update tests to use null coalescing operator in place of isset() in ternaries.

Developed as a subset of https://github.com/WordPress/wordpress-develop/pull/10654

Follow-up to [61404], [61403].

See #58874, #63430.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/fonts/font-library/wpRestFontFamiliesController.php

    r60918 r61424  
    10491049            $this->assertSame( $expected, $link['href'], 'The links for a font faces URL from the response data should match the REST endpoint.' );
    10501050
    1051             $embeddable = isset( $link['attributes']['embeddable'] )
    1052                 ? $link['attributes']['embeddable']
    1053                 : $link['embeddable'];
     1051            $embeddable = $link['attributes']['embeddable'] ?? $link['embeddable'];
    10541052            $this->assertTrue( $embeddable, 'The embeddable should be true.' );
    10551053        }
Note: See TracChangeset for help on using the changeset viewer.