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/meta/query.php

    r49554 r51397  
    147147        $query->parse_query_vars( $qv );
    148148
    149         $this->assertTrue( ! isset( $query->queries[0]['value'] ) );
     149        $this->assertArrayNotHasKey( 'value', $query->queries[0] );
    150150    }
    151151
     
    164164        $query->parse_query_vars( $qv );
    165165
    166         $this->assertTrue( ! isset( $query->queries[0]['value'] ) );
     166        $this->assertArrayNotHasKey( 'value', $query->queries[0] );
    167167    }
    168168
Note: See TracChangeset for help on using the changeset viewer.