public function AssetFactoryTest::testNestedFormula

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Factory/AssetFactoryTest.php, line 178

Class

AssetFactoryTest

Namespace

Assetic\Test\Factory

Code

public function testNestedFormula() {
  $this->fm
    ->expects($this
    ->once())
    ->method('get')
    ->with('foo')
    ->will($this
    ->returnValue($this
    ->getMock('Assetic\\Filter\\FilterInterface')));
  $inputs = array(
    'css/main.css',
    array(
      // nested formula
      array(
        'css/more.sass',
      ),
      array(
        'foo',
      ),
    ),
  );
  $asset = $this->factory
    ->createAsset($inputs, array(), array(
    'output' => 'css/*.css',
  ));
  $i = 0;
  foreach ($asset as $leaf) {
    $i++;
  }
  $this
    ->assertEquals(2, $i);
}