Make WordPress Core


Ignore:
Timestamp:
07/11/2021 12:41:48 PM (4 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/theme/themeDir.php

    r51371 r51403  
    4646        $this->assertSame( $themes['WordPress Default'], $theme );
    4747
    48         $this->assertFalse( empty( $theme ) );
     48        $this->assertNotEmpty( $theme );
    4949
    5050        // echo gen_tests_array( 'theme', $theme );
     
    7575        $theme = get_theme( 'Sandbox' );
    7676
    77         $this->assertFalse( empty( $theme ) );
     77        $this->assertNotEmpty( $theme );
    7878
    7979        // echo gen_tests_array( 'theme', $theme );
     
    112112
    113113        $theme = $themes['Stylesheet Only'];
    114         $this->assertFalse( empty( $theme ) );
     114        $this->assertNotEmpty( $theme );
    115115
    116116        // echo gen_tests_array( 'theme', $theme );
     
    206206
    207207        $theme = $themes['Page Template Theme'];
    208         $this->assertFalse( empty( $theme ) );
     208        $this->assertNotEmpty( $theme );
    209209
    210210        $templates = $theme['Template Files'];
Note: See TracChangeset for help on using the changeset viewer.