public function AssetCollectionTest::testLeafManipulation

File

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

Class

AssetCollectionTest

Namespace

Assetic\Test\Asset

Code

public function testLeafManipulation() {
  $coll = new AssetCollection(array(
    new StringAsset('asdf'),
  ));
  foreach ($coll as $leaf) {
    $leaf
      ->setTargetPath('asdf');
  }
  foreach ($coll as $leaf) {
    $this
      ->assertEquals('asdf', $leaf
      ->getTargetPath(), 'leaf changes persist between iterations');
  }
}