Make WordPress Core


Ignore:
Timestamp:
07/10/2021 11:15:44 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( isset( ... ) ) with assertArrayHasKey() to use native PHPUnit functionality.

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

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/actions.php

    r48937 r51397  
    424424        add_action( $tag, '__return_null', 11, 1 );
    425425
    426         $this->assertTrue( isset( $wp_filter[ $tag ][11] ) );
     426        $this->assertArrayHasKey( 11, $wp_filter[ $tag ] );
    427427        $this->assertArrayHasKey( '__return_null', $wp_filter[ $tag ][11] );
    428428
Note: See TracChangeset for help on using the changeset viewer.