public function ExpiringCacheTest::testHasNotExpired

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Cache/ExpiringCacheTest.php, line 53

Class

ExpiringCacheTest

Namespace

Assetic\Test\Cache

Code

public function testHasNotExpired() {
  $key = 'asdf';
  $expiresKey = 'asdf.expires';
  $theFuture = time() * 2;
  $this->inner
    ->expects($this
    ->once())
    ->method('has')
    ->with($key)
    ->will($this
    ->returnValue(true));
  $this->inner
    ->expects($this
    ->once())
    ->method('get')
    ->with($expiresKey)
    ->will($this
    ->returnValue($theFuture));
  $this
    ->assertTrue($this->cache
    ->has($key), '->has() returns true if a value the not expired');
}