From 6f07ff569bf012e1f57018437add3b959a2b2235 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 6 Sep 2020 02:51:45 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@48948 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/cache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php index 038b5fef34..c47ce4a8da 100644 --- a/tests/phpunit/tests/cache.php +++ b/tests/phpunit/tests/cache.php @@ -27,7 +27,7 @@ class Tests_Cache extends WP_UnitTestCase { } function test_miss() { - $this->assertEquals( null, $this->cache->get( 'test_miss' ) ); + $this->assertFalse( $this->cache->get( 'test_miss' ) ); } function test_add_get() {