From 176b4d6832f67e4969fe92d54f15b2fe71660d47 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Thu, 5 Apr 2018 21:38:54 +0200 Subject: [PATCH] Ping more privacy respecting organizations Signed-off-by: Roeland Jago Douma --- settings/Controller/CheckSetupController.php | 8 +++++--- .../Settings/Controller/CheckSetupControllerTest.php | 12 ++++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index 0e7e881645..4debc52fc5 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -104,8 +104,10 @@ class CheckSetupController extends Controller { } $siteArray = ['www.nextcloud.com', - 'www.google.com', - 'www.github.com']; + 'www.startpage.com', + 'www.eff.org', + 'www.edri.org', + ]; foreach($siteArray as $site) { if ($this->isSiteReachable($site)) { @@ -116,7 +118,7 @@ class CheckSetupController extends Controller { } /** - * Chceks if the ownCloud server can connect to a specific URL using both HTTPS and HTTP + * Checks if the Nextcloud server can connect to a specific URL using both HTTPS and HTTP * @return bool */ private function isSiteReachable($sitename) { diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php index a616cc3e70..9faf4a4b71 100644 --- a/tests/Settings/Controller/CheckSetupControllerTest.php +++ b/tests/Settings/Controller/CheckSetupControllerTest.php @@ -150,7 +150,7 @@ class CheckSetupControllerTest extends TestCase { ->method('get') ->will($this->throwException(new \Exception())); - $this->clientService->expects($this->exactly(3)) + $this->clientService->expects($this->exactly(4)) ->method('newClient') ->will($this->returnValue($client)); @@ -285,13 +285,17 @@ class CheckSetupControllerTest extends TestCase { ->will($this->throwException(new \Exception())); $client->expects($this->at(1)) ->method('get') - ->with('http://www.google.com/', []) + ->with('http://www.startpage.com/', []) ->will($this->throwException(new \Exception())); $client->expects($this->at(2)) ->method('get') - ->with('http://www.github.com/', []) + ->with('http://www.eff.org/', []) ->will($this->throwException(new \Exception())); - $this->clientService->expects($this->exactly(3)) + $client->expects($this->at(3)) + ->method('get') + ->with('http://www.edri.org/', []) + ->will($this->throwException(new \Exception())); + $this->clientService->expects($this->exactly(4)) ->method('newClient') ->will($this->returnValue($client)); $this->urlGenerator->expects($this->at(0))