Skip to content

Commit 8fb6be4

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Remove Google references when not needed Simplify usage of dirname() Remove Google references when not needed
2 parents bdac504 + cb0477e commit 8fb6be4

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
@@ -91,7 +91,7 @@ public function testValidRelativeUrl($url)
9191
public function getValidRelativeUrls()
9292
{
9393
return [
94-
['//google.com'],
94+
['//example.com'],
9595
['//symfony.fake/blog/'],
9696
['//symfony.com/search?type=&q=url+validator'],
9797
];
@@ -101,11 +101,11 @@ public function getValidUrls()
101101
{
102102
return [
103103
['http://a.pl'],
104-
['http://www.google.com'],
105-
['http://www.google.com.'],
106-
['http://www.google.museum'],
107-
['https://google.com/'],
108-
['https://google.com:80/'],
104+
['http://www.example.com'],
105+
['http://www.example.com.'],
106+
['http://www.example.museum'],
107+
['https://example.com/'],
108+
['https://example.com:80/'],
109109
['http://www.example.coop/'],
110110
['http://www.test-example.com/'],
111111
['http://www.symfony.com/'],
@@ -166,11 +166,11 @@ public function getValidUrls()
166166
public function getValidUrlsWithWhitespaces()
167167
{
168168
return [
169-
["\x20http://www.google.com"],
170-
["\x09\x09http://www.google.com."],
169+
["\x20http://www.example.com"],
170+
["\x09\x09http://www.example.com."],
171171
["http://symfony.fake/blog/\x0A"],
172172
["http://symfony.com/search?type=&q=url+validator\x0D\x0D"],
173-
["\x00https://google.com:80\x00"],
173+
["\x00https://example.com:80\x00"],
174174
["\x0B\x0Bhttp://username:[email protected]\x0B\x0B"],
175175
];
176176
}
@@ -214,10 +214,10 @@ public function testInvalidRelativeUrl($url)
214214
public function getInvalidRelativeUrls()
215215
{
216216
return [
217-
['/google.com'],
218-
['//goog_le.com'],
219-
['//google.com::aa'],
220-
['//google.com:aa'],
217+
['/example.com'],
218+
['//examp_le.com'],
219+
['//example.com::aa'],
220+
['//example.com:aa'],
221221
['//127.0.0.1:aa/'],
222222
['//[::1'],
223223
['//hello.☎/'],
@@ -235,15 +235,15 @@ public function getInvalidRelativeUrls()
235235
public function getInvalidUrls()
236236
{
237237
return [
238-
['google.com'],
239-
['://google.com'],
240-
['http ://google.com'],
241-
['http:/google.com'],
242-
['http://goog_le.com'],
243-
['http://google.com::aa'],
244-
['http://google.com:aa'],
245-
['ftp://google.fr'],
246-
['faked://google.fr'],
238+
['example.com'],
239+
['://example.com'],
240+
['http ://example.com'],
241+
['http:/example.com'],
242+
['http://examp_le.com'],
243+
['http://example.com::aa'],
244+
['http://example.com:aa'],
245+
['ftp://example.fr'],
246+
['faked://example.fr'],
247247
['http://127.0.0.1:aa/'],
248248
['ftp://[::1]/'],
249249
['http://[::1'],
@@ -276,7 +276,7 @@ public function testCustomProtocolIsValid($url)
276276
public function getValidCustomUrls()
277277
{
278278
return [
279-
['ftp://google.com'],
279+
['ftp://example.com'],
280280
['file://127.0.0.1'],
281281
['git://[::1]/'],
282282
];

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)