use Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy;
use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy;
use Symfony\Component\Asset\VersionStrategy\VersionStrategyInterface;
class UrlPackageTest extends TestCase
{ /**
* @dataProvider getConfigs
*/
public function testGetUrl($baseUrls,
$format,
$path,
$expected) { $package =
new UrlPackage($baseUrls,
new StaticVersionStrategy('v1',
$format));
$this->
assertSame($expected,
$package->
getUrl($path));
} public static function getConfigs() { return [ ['http://example.net', '', 'http://example.com/foo', 'http://example.com/foo'
],
['http://example.net', '', 'https://example.com/foo', 'https://example.com/foo'
],
['http://example.net', '', '//example.com/foo', '//example.com/foo'
],
['file:///example/net', '', 'file:///example/com/foo', 'file:///example/com/foo'
],
['ftp://example.net', '', 'ftp://example.com', 'ftp://example.com'
],
[