Make WordPress Core


Ignore:
Timestamp:
02/01/2024 01:00:56 AM (10 months ago)
Author:
dmsnell
Message:

HTML API: Test cleanup

Rename $p variable to $processor in tests for clarity.

Use static data providers. A mix of static and non-static data providers were
used in HTML API tests. Data providers are required to be static in the next
PHPUnit version and there's no harm in using them consistently now.

Follow-up to [57507]

Props jonsurrell
See #59647

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/html-api/wpHtmlSupportRequiredOpenElements.php

    r57264 r57508  
    4545     */
    4646    private function ensure_support_is_added_everywhere( $tag_name ) {
    47         $p = WP_HTML_Processor::create_fragment( "<$tag_name>" );
    48 
    49         $this->assertFalse( $p->step(), "Must support terminating elements in specific scope check before adding support for the {$tag_name} element." );
     47        $processor = WP_HTML_Processor::create_fragment( "<$tag_name>" );
     48
     49        $this->assertFalse( $processor->step(), "Must support terminating elements in specific scope check before adding support for the {$tag_name} element." );
    5050    }
    5151
Note: See TracChangeset for help on using the changeset viewer.