Make WordPress Core


Ignore:
Timestamp:
07/10/2021 11:15:44 AM (3 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/kses.php

    r50987 r51397  
    508508
    509509        $tags = wp_kses_allowed_html();
    510         $this->assertFalse( isset( $tags['a']['rel'] ) );
     510        $this->assertArrayNotHasKey( 'rel', $tags['a'] );
    511511
    512512        $this->assertSame( array(), wp_kses_allowed_html( 'strip' ) );
Note: See TracChangeset for help on using the changeset viewer.