public function AssetCollectionTest::testGetLastModifiedWithValues

File

drupal/core/vendor/kriswallsmith/assetic/tests/Assetic/Test/Asset/AssetCollectionTest.php, line 169

Class

AssetCollectionTest

Namespace

Assetic\Test\Asset

Code

public function testGetLastModifiedWithValues() {
  $vars = array(
    'locale',
  );
  $asset = new FileAsset(__DIR__ . '/../Fixture/messages.{locale}.js', array(), null, null, $vars);
  $coll = new AssetCollection(array(
    $asset,
  ), array(), null, $vars);
  $coll
    ->setValues(array(
    'locale' => 'en',
  ));
  try {
    $coll
      ->getLastModified();
  } catch (\InvalidArgumentException $e) {
    $this
      ->fail("->getLastModified() shouldn't fail for assets with vars");
  }
}