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