Make WordPress Core

Changeset 48948


Ignore:
Timestamp:
09/06/2020 02:51:45 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Correct assertion in Tests_Cache::test_miss().

On failure to retrieve contents, WP_Object_Cache::get() returns false, not null.

The test only passed accidentally due to assertEquals() not performing a strict type check.

Props johnbillion.
See #38266.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/cache.php

    r48937 r48948  
    2828
    2929    function test_miss() {
    30         $this->assertEquals( null, $this->cache->get( 'test_miss' ) );
     30        $this->assertFalse( $this->cache->get( 'test_miss' ) );
    3131    }
    3232
Note: See TracChangeset for help on using the changeset viewer.