public function AssetFactoryTest::testCreateAssetReference

File

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

Class

AssetFactoryTest

Namespace

Assetic\Test\Factory

Code

public function testCreateAssetReference() {
  $referenced = $this
    ->getMock('Assetic\\Asset\\AssetInterface');
  $this->am
    ->expects($this
    ->any())
    ->method('get')
    ->with('jquery')
    ->will($this
    ->returnValue($referenced));
  $assets = $this->factory
    ->createAsset(array(
    '@jquery',
  ));
  $arr = iterator_to_array($assets);
  $this
    ->assertInstanceOf('Assetic\\Asset\\AssetReference', $arr[0], '->createAsset() creates a reference');
}