WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2021 12:31:19 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_object( ... ) ) with assertIsObject() to use native PHPUnit functionality.

Follow-up to [51331], [51335].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/nav-menu.php

    r50284 r51337  
    552552     */
    553553    function _confirm_nav_menu_item_args_object( $args ) {
    554         $this->assertTrue( is_object( $args ) );
     554        $this->assertIsObject( $args );
    555555        return $args;
    556556    }
    557557
    558558    function _confirm_second_param_args_object( $ignored_1, $args ) {
    559         $this->assertTrue( is_object( $args ) );
     559        $this->assertIsObject( $args );
    560560        return $ignored_1;
    561561    }
    562562
    563563    function _confirm_third_param_args_object( $ignored_1, $ignored_2, $args ) {
    564         $this->assertTrue( is_object( $args ) );
     564        $this->assertIsObject( $args );
    565565        return $ignored_1;
    566566    }
    567567
    568568    function _confirm_forth_param_args_object( $ignored_1, $ignored_2, $ignored_3, $args ) {
    569         $this->assertTrue( is_object( $args ) );
     569        $this->assertIsObject( $args );
    570570        return $ignored_1;
    571571    }
Note: See TracChangeset for help on using the changeset viewer.