Expanded class hierarchy of EnsureFilterWorkerTest
class EnsureFilterWorkerTest extends \PHPUnit_Framework_TestCase {
public function testMatch() {
$filter = $this
->getMock('Assetic\\Filter\\FilterInterface');
$asset = $this
->getMock('Assetic\\Asset\\AssetInterface');
$asset
->expects($this
->once())
->method('getTargetPath')
->will($this
->returnValue('css/main.css'));
$asset
->expects($this
->once())
->method('ensureFilter')
->with($filter);
$worker = new EnsureFilterWorker('/\\.css$/', $filter);
$worker
->process($asset);
}
public function testNonMatch() {
$filter = $this
->getMock('Assetic\\Filter\\FilterInterface');
$asset = $this
->getMock('Assetic\\Asset\\AssetInterface');
$asset
->expects($this
->once())
->method('getTargetPath')
->will($this
->returnValue('js/all.js'));
$asset
->expects($this
->never())
->method('ensureFilter');
$worker = new EnsureFilterWorker('/\\.css$/', $filter);
$worker
->process($asset);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EnsureFilterWorkerTest:: |
public | function | ||
EnsureFilterWorkerTest:: |
public | function |