Skip to content

Commit cf248f3

Browse files
Merge branch '4.4'
* 4.4: Update GitHub PR template [DI] fix related to preloading [HttpKernel] fix compat with legacy DebugClassLoader [WebProfilerBundle] Assign automatic colors to custom Stopwatch categories [DI] use dirname() when possible Simplify usage of dirname() Remove Google references when not needed Simplify usage of dirname() don't dump a scalar tag value on its own line Remove Google references when not needed [DI] fix Preloader [HttpClient] fix calling the buffer-enabling callback [HttpClient] fix php notice on push do not perform string operations on null Require exact match when reading from stdin with a dash
2 parents f100b0c + 8fb6be4 commit cf248f3

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

Tests/Constraints/UrlValidatorTest.php

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testValidRelativeUrl($url)
8787
public function getValidRelativeUrls()
8888
{
8989
return [
90-
['//google.com'],
90+
['//example.com'],
9191
['//symfony.fake/blog/'],
9292
['//symfony.com/search?type=&q=url+validator'],
9393
];
@@ -97,11 +97,11 @@ public function getValidUrls()
9797
{
9898
return [
9999
['http://a.pl'],
100-
['http://www.google.com'],
101-
['http://www.google.com.'],
102-
['http://www.google.museum'],
103-
['https://google.com/'],
104-
['https://google.com:80/'],
100+
['http://www.example.com'],
101+
['http://www.example.com.'],
102+
['http://www.example.museum'],
103+
['https://example.com/'],
104+
['https://example.com:80/'],
105105
['http://www.example.coop/'],
106106
['http://www.test-example.com/'],
107107
['http://www.symfony.com/'],
@@ -162,11 +162,11 @@ public function getValidUrls()
162162
public function getValidUrlsWithWhitespaces()
163163
{
164164
return [
165-
["\x20http://www.google.com"],
166-
["\x09\x09http://www.google.com."],
165+
["\x20http://www.example.com"],
166+
["\x09\x09http://www.example.com."],
167167
["http://symfony.fake/blog/\x0A"],
168168
["http://symfony.com/search?type=&q=url+validator\x0D\x0D"],
169-
["\x00https://google.com:80\x00"],
169+
["\x00https://example.com:80\x00"],
170170
["\x0B\x0Bhttp://username:[email protected]\x0B\x0B"],
171171
];
172172
}
@@ -210,10 +210,10 @@ public function testInvalidRelativeUrl($url)
210210
public function getInvalidRelativeUrls()
211211
{
212212
return [
213-
['/google.com'],
214-
['//goog_le.com'],
215-
['//google.com::aa'],
216-
['//google.com:aa'],
213+
['/example.com'],
214+
['//examp_le.com'],
215+
['//example.com::aa'],
216+
['//example.com:aa'],
217217
['//127.0.0.1:aa/'],
218218
['//[::1'],
219219
['//hello.☎/'],
@@ -231,15 +231,15 @@ public function getInvalidRelativeUrls()
231231
public function getInvalidUrls()
232232
{
233233
return [
234-
['google.com'],
235-
['://google.com'],
236-
['http ://google.com'],
237-
['http:/google.com'],
238-
['http://goog_le.com'],
239-
['http://google.com::aa'],
240-
['http://google.com:aa'],
241-
['ftp://google.fr'],
242-
['faked://google.fr'],
234+
['example.com'],
235+
['://example.com'],
236+
['http ://example.com'],
237+
['http:/example.com'],
238+
['http://examp_le.com'],
239+
['http://example.com::aa'],
240+
['http://example.com:aa'],
241+
['ftp://example.fr'],
242+
['faked://example.fr'],
243243
['http://127.0.0.1:aa/'],
244244
['ftp://[::1]/'],
245245
['http://[::1'],
@@ -272,7 +272,7 @@ public function testCustomProtocolIsValid($url)
272272
public function getValidCustomUrls()
273273
{
274274
return [
275-
['ftp://google.com'],
275+
['ftp://example.com'],
276276
['file://127.0.0.1'],
277277
['git://[::1]/'],
278278
];

Tests/Resources/TranslationFilesTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ public function provideTranslationFiles()
2929
{
3030
return array_map(
3131
function ($filePath) { return (array) $filePath; },
32-
glob(\dirname(\dirname(__DIR__)).'/Resources/translations/*.xlf')
32+
glob(\dirname(__DIR__, 2).'/Resources/translations/*.xlf')
3333
);
3434
}
3535

3636
public function testNorwegianAlias()
3737
{
3838
$this->assertFileEquals(
39-
\dirname(\dirname(__DIR__)).'/Resources/translations/validators.nb.xlf',
40-
\dirname(\dirname(__DIR__)).'/Resources/translations/validators.no.xlf',
39+
\dirname(__DIR__, 2).'/Resources/translations/validators.nb.xlf',
40+
\dirname(__DIR__, 2).'/Resources/translations/validators.no.xlf',
4141
'The NO locale should be an alias for the NB variant of the Norwegian language.'
4242
);
4343
}

0 commit comments

Comments
 (0)