public function AssetFactoryTest::testWorkers

File

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

Class

AssetFactoryTest

Namespace

Assetic\Test\Factory

Code

public function testWorkers() {
  $worker = $this
    ->getMock('Assetic\\Factory\\Worker\\WorkerInterface');

  // called once on the collection and once on each leaf
  $worker
    ->expects($this
    ->exactly(3))
    ->method('process')
    ->with($this
    ->isInstanceOf('Assetic\\Asset\\AssetInterface'));
  $this->factory
    ->addWorker($worker);
  $this->factory
    ->createAsset(array(
    'foo.js',
    'bar.js',
  ));
}