public function AsseticExtensionTest::testReference

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Extension/Twig/AsseticExtensionTest.php, line 44

Class

AsseticExtensionTest

Namespace

Assetic\Test\Extension\Twig

Code

public function testReference() {
  $asset = $this
    ->getMock('Assetic\\Asset\\AssetInterface');
  $this->am
    ->expects($this
    ->any())
    ->method('get')
    ->with('foo')
    ->will($this
    ->returnValue($asset));
  $xml = $this
    ->renderXml('reference.twig');
  $this
    ->assertEquals(1, count($xml->asset));
  $this
    ->assertStringStartsWith('css/', (string) $xml->asset['url']);
}