Make WordPress Core


Ignore:
Timestamp:
12/26/2025 11:51:28 AM (4 months ago)
Author:
jonsurrell
Message:

Tests: Update fonts tests to use semantic HTML comparison.

This aims to make the tests more robust.

Follow-up to [60295], [61391], [61392].

Props jonsurrell.
See #64225.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/fonts/font-face/wpFontFace/generateAndPrint.php

    r59259 r61409  
    3535        $expected_output = sprintf( $style_element, $expected );
    3636
    37         $this->expectOutputString( $expected_output );
    38         $font_face->generate_and_print( $fonts );
     37        $output = get_echo( array( $font_face, 'generate_and_print' ), array( $fonts ) );
     38        $this->assertEqualHTML( $expected_output, $output );
    3939    }
    4040}
Note: See TracChangeset for help on using the changeset viewer.