public function testFilterFunction() {
$filter = $this
->getMock('Assetic\\Filter\\FilterInterface');
$this->fm
->expects($this
->once())
->method('get')
->with('some_filter')
->will($this
->returnValue($filter));
$this->twig
->addExtension(new AsseticExtension($this->factory, array(
'some_func' => array(
'filter' => 'some_filter',
'options' => array(
'output' => 'css/*.css',
),
),
)));
$xml = $this
->renderXml('function.twig');
$this
->assertEquals(1, count($xml->asset));
$this
->assertStringEndsWith('.css', (string) $xml->asset[0]['url']);
}