You are here

public function CacheTest::testFetchMissShouldReturnFalse in Plug 7

File

lib/doctrine/cache/tests/Doctrine/Tests/Common/Cache/CacheTest.php, line 264

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);
}