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/dependencies/jquery.php

    r50441 r51397  
    3535            $o = $scripts->query( $dep, 'registered' );
    3636            $this->assertInstanceOf( '_WP_Dependency', $object );
    37             $this->assertTrue( isset( $jquery_scripts[ $dep ] ) );
     37            $this->assertArrayHasKey( $dep, $jquery_scripts );
    3838            $this->assertSame( $jquery_scripts[ $dep ], $o->src );
    3939        }
Note: See TracChangeset for help on using the changeset viewer.