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/option/networkOption.php

    r48937 r51397  
    6262        $options = wp_load_alloptions();
    6363
    64         $this->assertFalse( isset( $options[ $key ] ) );
     64        $this->assertArrayNotHasKey( $key, $options );
    6565    }
    6666
     
    7676        $options = wp_load_alloptions();
    7777
    78         $this->assertFalse( isset( $options[ $key ] ) );
     78        $this->assertArrayNotHasKey( $key, $options );
    7979    }
    8080
Note: See TracChangeset for help on using the changeset viewer.