public function CachedFormulaLoaderTest::testNotDebug

File

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

Class

CachedFormulaLoaderTest

Namespace

Assetic\Test\Factory\Loader

Code

public function testNotDebug() {
  $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(false));
  $this->loader
    ->expects($this
    ->once())
    ->method('load')
    ->with($this->resource)
    ->will($this
    ->returnValue($expected));
  $this->configCache
    ->expects($this
    ->once())
    ->method('set')
    ->with($this
    ->isType('string'), $expected);
  $loader = new CachedFormulaLoader($this->loader, $this->configCache);
  $this
    ->assertEquals($expected, $loader
    ->load($this->resource), '->load() returns formulae');
}