public function testTraversableRemoteFiles() { $this->object->addRemoteFiles(new \ArrayIterator(array('http://jquery.com/jquery.js'))); $this->assertEquals(1, count($this->object->getRemoteFiles())); }
/** * Attaches BowerLoader to the FileCollection instance. * @param FileCollection * @param string resource type (eg. "css") * @return void */ public function attach(FileCollection $collection, $resource) { if ($this->prepend) { $files = $collection->getFiles(); $remoteFiles = $collection->getRemoteFiles(); $collection->clear(); } $collection->addFiles($this->getFiles($resource)); if ($this->prepend) { $collection->addFiles($files); $collection->addRemoteFiles($remoteFiles); } }