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',
));
}