Make WordPress Core


Ignore:
Timestamp:
07/11/2021 12:41:48 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( empty( ... ) ) with assertEmpty() to use native PHPUnit functionality.

Follow-up to [51335], [51337], [51367], [51397].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/setupPostdata.php

    r50449 r51403  
    318318        setup_postdata( $post2 );
    319319
    320         $this->assertTrue( empty( $GLOBALS['more'] ) );
     320        $this->assertEmpty( $GLOBALS['more'] );
    321321    }
    322322
     
    336336        setup_postdata( $post );
    337337
    338         $this->assertTrue( empty( $GLOBALS['more'] ) );
     338        $this->assertEmpty( $GLOBALS['more'] );
    339339    }
    340340
     
    373373
    374374                // $more should refer to the current loop.
    375                 $this->assertTrue( empty( $GLOBALS['more'] ) );
     375                $this->assertEmpty( $GLOBALS['more'] );
    376376            }
    377377        }
Note: See TracChangeset for help on using the changeset viewer.