minor #33530 Remove Google references when not needed (fabpot)

This PR was merged into the 3.4 branch.

Discussion
----------

Remove Google references when not needed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

No need to promote Google.

Commits
-------

9665d7633d Remove Google references when not needed
This commit is contained in:
Fabien Potencier 2019-09-10 13:21:38 +02:00
commit f436cc80f1
6 changed files with 30 additions and 30 deletions

View File

@ -2396,7 +2396,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
public function testUrlWithDefaultProtocol() public function testUrlWithDefaultProtocol()
{ {
$url = 'http://www.google.com?foo1=bar1&foo2=bar2'; $url = 'http://www.example.com?foo1=bar1&foo2=bar2';
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']); $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']);
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']], $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
@ -2404,7 +2404,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
[@type="text"] [@type="text"]
[@name="name"] [@name="name"]
[@class="my&class form-control"] [@class="my&class form-control"]
[@value="http://www.google.com?foo1=bar1&foo2=bar2"] [@value="http://www.example.com?foo1=bar1&foo2=bar2"]
[@inputmode="url"] [@inputmode="url"]
' '
); );
@ -2412,7 +2412,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
public function testUrlWithoutDefaultProtocol() public function testUrlWithoutDefaultProtocol()
{ {
$url = 'http://www.google.com?foo1=bar1&foo2=bar2'; $url = 'http://www.example.com?foo1=bar1&foo2=bar2';
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]); $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]);
$this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']], $this->assertWidgetMatchesXpath($form->createView(), ['attr' => ['class' => 'my&class']],
@ -2420,7 +2420,7 @@ abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
[@type="url"] [@type="url"]
[@name="name"] [@name="name"]
[@class="my&class form-control"] [@class="my&class form-control"]
[@value="http://www.google.com?foo1=bar1&foo2=bar2"] [@value="http://www.example.com?foo1=bar1&foo2=bar2"]
' '
); );
} }

View File

@ -44,10 +44,10 @@ class CookieTest extends TestCase
return [ return [
['foo=bar; path=/'], ['foo=bar; path=/'],
['foo=bar; path=/foo'], ['foo=bar; path=/foo'],
['foo=bar; domain=google.com; path=/'], ['foo=bar; domain=example.com; path=/'],
['foo=bar; domain=example.com; path=/; secure', 'https://example.com/'], ['foo=bar; domain=example.com; path=/; secure', 'https://example.com/'],
['foo=bar; path=/; httponly'], ['foo=bar; path=/; httponly'],
['foo=bar; domain=google.com; path=/foo; secure; httponly', 'https://google.com/'], ['foo=bar; domain=example.com; path=/foo; secure; httponly', 'https://example.com/'],
['foo=bar=baz; path=/'], ['foo=bar=baz; path=/'],
['foo=bar%3Dbaz; path=/'], ['foo=bar%3Dbaz; path=/'],
]; ];

View File

@ -2189,14 +2189,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
public function testUrlWithDefaultProtocol() public function testUrlWithDefaultProtocol()
{ {
$url = 'http://www.google.com?foo1=bar1&foo2=bar2'; $url = 'http://www.example.com?foo1=bar1&foo2=bar2';
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']); $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => 'http']);
$this->assertWidgetMatchesXpath($form->createView(), [], $this->assertWidgetMatchesXpath($form->createView(), [],
'/input '/input
[@type="text"] [@type="text"]
[@name="name"] [@name="name"]
[@value="http://www.google.com?foo1=bar1&foo2=bar2"] [@value="http://www.example.com?foo1=bar1&foo2=bar2"]
[@inputmode="url"] [@inputmode="url"]
' '
); );
@ -2204,14 +2204,14 @@ abstract class AbstractLayoutTest extends FormIntegrationTestCase
public function testUrlWithoutDefaultProtocol() public function testUrlWithoutDefaultProtocol()
{ {
$url = 'http://www.google.com?foo1=bar1&foo2=bar2'; $url = 'http://www.example.com?foo1=bar1&foo2=bar2';
$form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]); $form = $this->factory->createNamed('name', 'Symfony\Component\Form\Extension\Core\Type\UrlType', $url, ['default_protocol' => null]);
$this->assertWidgetMatchesXpath($form->createView(), [], $this->assertWidgetMatchesXpath($form->createView(), [],
'/input '/input
[@type="url"] [@type="url"]
[@name="name"] [@name="name"]
[@value="http://www.google.com?foo1=bar1&foo2=bar2"] [@value="http://www.example.com?foo1=bar1&foo2=bar2"]
' '
); );
} }

View File

@ -39,8 +39,8 @@ class ClientTest extends TestCase
$this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request'); $this->assertEquals('Request: /', $client->getResponse()->getContent(), '->doRequest() uses the request handler to make the request');
$this->assertEquals('www.example.com', $client->getRequest()->getHost(), '->doRequest() uses the request handler to make the request'); $this->assertEquals('www.example.com', $client->getRequest()->getHost(), '->doRequest() uses the request handler to make the request');
$client->request('GET', 'http://www.example.com/?parameter=http://google.com'); $client->request('GET', 'http://www.example.com/?parameter=http://example.com');
$this->assertEquals('http://www.example.com/?parameter='.urlencode('http://google.com'), $client->getRequest()->getUri(), '->doRequest() uses the request handler to make the request'); $this->assertEquals('http://www.example.com/?parameter='.urlencode('http://example.com'), $client->getRequest()->getUri(), '->doRequest() uses the request handler to make the request');
} }
public function testGetScript() public function testGetScript()

View File

@ -67,11 +67,11 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
{ {
return [ return [
['http://a.pl'], ['http://a.pl'],
['http://www.google.com'], ['http://www.example.com'],
['http://www.google.com.'], ['http://www.example.com.'],
['http://www.google.museum'], ['http://www.example.museum'],
['https://google.com/'], ['https://example.com/'],
['https://google.com:80/'], ['https://example.com:80/'],
['http://www.example.coop/'], ['http://www.example.coop/'],
['http://www.test-example.com/'], ['http://www.test-example.com/'],
['http://www.symfony.com/'], ['http://www.symfony.com/'],
@ -148,15 +148,15 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
public function getInvalidUrls() public function getInvalidUrls()
{ {
return [ return [
['google.com'], ['example.com'],
['://google.com'], ['://example.com'],
['http ://google.com'], ['http ://example.com'],
['http:/google.com'], ['http:/example.com'],
['http://goog_le.com'], ['http://examp_le.com'],
['http://google.com::aa'], ['http://example.com::aa'],
['http://google.com:aa'], ['http://example.com:aa'],
['ftp://google.fr'], ['ftp://example.fr'],
['faked://google.fr'], ['faked://example.fr'],
['http://127.0.0.1:aa/'], ['http://127.0.0.1:aa/'],
['ftp://[::1]/'], ['ftp://[::1]/'],
['http://[::1'], ['http://[::1'],
@ -189,7 +189,7 @@ class UrlValidatorTest extends ConstraintValidatorTestCase
public function getValidCustomUrls() public function getValidCustomUrls()
{ {
return [ return [
['ftp://google.com'], ['ftp://example.com'],
['file://127.0.0.1'], ['file://127.0.0.1'],
['git://[::1]/'], ['git://[::1]/'],
]; ];

View File

@ -50,12 +50,12 @@ SplFileInfo {
%A} %A}
EOTXT EOTXT
], ],
['https://google.com/about', <<<'EOTXT' ['https://example.com/about', <<<'EOTXT'
SplFileInfo { SplFileInfo {
%Apath: "https://google.com" %Apath: "https://example.com"
filename: "about" filename: "about"
basename: "about" basename: "about"
pathname: "https://google.com/about" pathname: "https://example.com/about"
extension: "" extension: ""
realPath: false realPath: false
%A} %A}