public function AssetCacheTest::testLoadFromCache

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Asset/AssetCacheTest.php, line 30

Class

AssetCacheTest

Namespace

Assetic\Test\Asset

Code

public function testLoadFromCache() {
  $content = 'asdf';
  $filter = $this
    ->getMock('Assetic\\Filter\\FilterInterface');
  $this->inner
    ->expects($this
    ->once())
    ->method('getFilters')
    ->will($this
    ->returnValue(array(
    $filter,
  )));
  $this->cache
    ->expects($this
    ->once())
    ->method('has')
    ->with($this
    ->isType('string'))
    ->will($this
    ->returnValue(true));
  $this->cache
    ->expects($this
    ->once())
    ->method('get')
    ->with($this
    ->isType('string'))
    ->will($this
    ->returnValue($content));
  $this->inner
    ->expects($this
    ->once())
    ->method('setContent')
    ->with($content);
  $this->asset
    ->load($filter);
}