public function CachedFormulaLoaderTest::testNotDebugCached

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Factory/Loader/CachedFormulaLoaderTest.php, line 54

Class

CachedFormulaLoaderTest

Namespace

Assetic\Test\Factory\Loader

Code

public function testNotDebugCached() {
  $expected = array(
    'foo' => array(
      array(),
      array(),
      array(),
    ),
    'bar' => array(
      array(),
      array(),
      array(),
    ),
  );
  $this->configCache
    ->expects($this
    ->once())
    ->method('has')
    ->with($this
    ->isType('string'))
    ->will($this
    ->returnValue(true));
  $this->resource
    ->expects($this
    ->never())
    ->method('isFresh');
  $this->configCache
    ->expects($this
    ->once())
    ->method('get')
    ->with($this
    ->isType('string'))
    ->will($this
    ->returnValue($expected));
  $loader = new CachedFormulaLoader($this->loader, $this->configCache);
  $this
    ->assertEquals($expected, $loader
    ->load($this->resource), '->load() returns formulae');
}