You are here

public function CacheTest::testFetchMissShouldReturnFalse in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php \Doctrine\Tests\Common\Cache\CacheTest::testFetchMissShouldReturnFalse()

File

vendor/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php, line 266

Class

CacheTest

Namespace

Doctrine\Tests\Common\Cache

Code

public function testFetchMissShouldReturnFalse() {
  $cache = $this
    ->_getCacheDriver();

  /* Ensure that caches return boolean false instead of null on a fetch
   * miss to be compatible with ORM integration.
   */
  $result = $cache
    ->fetch('nonexistent_key');
  $this
    ->assertFalse($result);
  $this
    ->assertNotNull($result);
}