summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit')
-rw-r--r--tests/phpunit/tests/cache.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/phpunit/tests/cache.php b/tests/phpunit/tests/cache.php
index 740332503c..16206208da 100644
--- a/tests/phpunit/tests/cache.php
+++ b/tests/phpunit/tests/cache.php
@@ -47,11 +47,26 @@ class Tests_Cache extends WP_UnitTestCase {
$this->assertSame( $val, $this->cache->get( $key ) );
}
+ /**
+ * @ticket 20004
+ */
function test_add_get_null() {
$key = __FUNCTION__;
$val = null;
- // You can store null in the cache.
+ // You can store `null` in the cache.
+ $this->assertTrue( $this->cache->add( $key, $val ) );
+ $this->assertSame( $val, $this->cache->get( $key ) );
+ }
+
+ /**
+ * @ticket 20004
+ */
+ function test_add_get_false() {
+ $key = __FUNCTION__;
+ $val = false;
+
+ // You can store `false` in the cache.
$this->assertTrue( $this->cache->add( $key, $val ) );
$this->assertSame( $val, $this->cache->get( $key ) );
}