@@ -33,21 +33,28 @@ public function getConfigs()
3333 array ('http://example.net ' , '' , 'http://example.com/foo ' , 'http://example.com/foo ' ),
3434 array ('http://example.net ' , '' , 'https://example.com/foo ' , 'https://example.com/foo ' ),
3535 array ('http://example.net ' , '' , '//example.com/foo ' , '//example.com/foo ' ),
36+ array ('file:///example/net ' , '' , 'file:///example/com/foo ' , 'file:///example/com/foo ' ),
37+ array ('ftp://example.net ' , '' , 'ftp://example.com ' , 'ftp://example.com ' ),
3638
3739 array ('http://example.com ' , '' , '/foo ' , 'http://example.com/foo?v1 ' ),
3840 array ('http://example.com ' , '' , 'foo ' , 'http://example.com/foo?v1 ' ),
3941 array ('http://example.com/ ' , '' , 'foo ' , 'http://example.com/foo?v1 ' ),
4042 array ('http://example.com/foo ' , '' , 'foo ' , 'http://example.com/foo/foo?v1 ' ),
4143 array ('http://example.com/foo/ ' , '' , 'foo ' , 'http://example.com/foo/foo?v1 ' ),
44+ array ('file:///example/com/foo/ ' , '' , 'foo ' , 'file:///example/com/foo/foo?v1 ' ),
4245
4346 array (array ('http://example.com ' ), '' , '/foo ' , 'http://example.com/foo?v1 ' ),
4447 array (array ('http://example.com ' , 'http://example.net ' ), '' , '/foo ' , 'http://example.com/foo?v1 ' ),
4548 array (array ('http://example.com ' , 'http://example.net ' ), '' , '/fooa ' , 'http://example.net/fooa?v1 ' ),
49+ array (array ('file:///example/com ' , 'file:///example/net ' ), '' , '/foo ' , 'file:///example/com/foo?v1 ' ),
50+ array (array ('ftp://example.com ' , 'ftp://example.net ' ), '' , '/fooa ' , 'ftp://example.net/fooa?v1 ' ),
4651
4752 array ('http://example.com ' , 'version-%2$s/%1$s ' , '/foo ' , 'http://example.com/version-v1/foo ' ),
4853 array ('http://example.com ' , 'version-%2$s/%1$s ' , 'foo ' , 'http://example.com/version-v1/foo ' ),
4954 array ('http://example.com ' , 'version-%2$s/%1$s ' , 'foo/ ' , 'http://example.com/version-v1/foo/ ' ),
5055 array ('http://example.com ' , 'version-%2$s/%1$s ' , '/foo/ ' , 'http://example.com/version-v1/foo/ ' ),
56+ array ('file:///example/com ' , 'version-%2$s/%1$s ' , '/foo/ ' , 'file:///example/com/version-v1/foo/ ' ),
57+ array ('ftp://example.com ' , 'version-%2$s/%1$s ' , '/foo/ ' , 'ftp://example.com/version-v1/foo/ ' ),
5158 );
5259 }
5360
@@ -97,11 +104,21 @@ public function testNoBaseUrls()
97104 }
98105
99106 /**
107+ * @dataProvider getWrongBaseUrlConfig
108+ *
100109 * @expectedException \Symfony\Component\Asset\Exception\InvalidArgumentException
101110 */
102- public function testWrongBaseUrl ()
111+ public function testWrongBaseUrl ($ baseUrls )
103112 {
104- new UrlPackage (array ('not-a-url ' ), new EmptyVersionStrategy ());
113+ new UrlPackage ($ baseUrls , new EmptyVersionStrategy ());
114+ }
115+
116+ public function getWrongBaseUrlConfig ()
117+ {
118+ return array (
119+ array ('not-a-url ' ),
120+ array ('not-a-url-with-query?query=:// ' ),
121+ );
105122 }
106123
107124 private function getContext ($ secure )
0 commit comments