public function AssetReferenceTest::testFilterFlush

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Asset/AssetReferenceTest.php, line 62

Class

AssetReferenceTest

Namespace

Assetic\Test\Asset

Code

public function testFilterFlush() {
  $asset = $this
    ->getMock('Assetic\\Asset\\AssetInterface');
  $this->am
    ->expects($this
    ->exactly(2))
    ->method('get')
    ->with('foo')
    ->will($this
    ->returnValue($asset));
  $asset
    ->expects($this
    ->once())
    ->method('ensureFilter');
  $asset
    ->expects($this
    ->once())
    ->method('getFilters')
    ->will($this
    ->returnValue(array()));
  $this->ref
    ->ensureFilter($this
    ->getMock('Assetic\\Filter\\FilterInterface'));
  $this
    ->assertInternalType('array', $this->ref
    ->getFilters(), '->getFilters() flushes and returns filters');
}