Make WordPress Core


Ignore:
Timestamp:
05/26/2025 12:03:18 PM (6 weeks ago)
Author:
johnbillion
Message:

Build/Test Tools: Add assertions that test the tests.

Several tests perform assertions conditionally or iterate dynamic arrays without ensuring they're populated. If the test is faulty and the condition never evaluates to true, or the array being iterated is unexpectedly empty, this will now correctly cause the test to fail.

Props johnbillion, jrf.

See #63167

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/xmlrpc/wp/getPageList.php

    r52010 r60251  
    4242        $results = $this->myxmlrpcserver->wp_getPageList( array( 1, 'editor', 'editor' ) );
    4343        $this->assertNotIXRError( $results );
     44        $this->assertNotEmpty( $results );
    4445
    4546        foreach ( $results as $result ) {
Note: See TracChangeset for help on using the changeset viewer.