WordPress.org

Make WordPress Core


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

Tests: Use more appropriate assertions in various tests.

This replaces instances of assertTrue( is_array( ... ) ) with assertIsArray() to use native PHPUnit functionality.

Follow-up to [51331].

See #53363.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php

    r51021 r51335  
    7373        $routes = rest_get_server()->get_routes();
    7474
    75         $this->assertTrue( is_array( $routes ), '`get_routes` should return an array.' );
     75        $this->assertIsArray( $routes, '`get_routes` should return an array.' );
    7676        $this->assertTrue( ! empty( $routes ), 'Routes should not be empty.' );
    7777
Note: See TracChangeset for help on using the changeset viewer.