Make WordPress Core


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

    r48937 r51403  
    232232        // Just in case we don't trust assertSame().
    233233        $obj->foo = true;
    234         $this->assertFalse( empty( $args[0][0]->foo ) );
     234        $this->assertNotEmpty( $args[0][0]->foo );
    235235    }
    236236
     
    255255        // Just in case we don't trust assertSame().
    256256        $obj->foo = true;
    257         $this->assertFalse( empty( $args[0][1]->foo ) );
     257        $this->assertNotEmpty( $args[0][1]->foo );
    258258
    259259        $args = $b->get_args();
     
    261261        // Just in case we don't trust assertSame().
    262262        $obj->foo = true;
    263         $this->assertFalse( empty( $args[0][1]->foo ) );
     263        $this->assertNotEmpty( $args[0][1]->foo );
    264264
    265265    }
Note: See TracChangeset for help on using the changeset viewer.