Skip to content

Commit

Permalink
Ping more privacy respecting organizations
Browse files Browse the repository at this point in the history
Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer committed Apr 5, 2018
1 parent feef3cb commit 176b4d6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 5 additions & 3 deletions settings/Controller/CheckSetupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ private function isInternetConnectionWorking() {
}

$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)) {
Expand All @@ -116,7 +118,7 @@ private function isInternetConnectionWorking() {
}

/**
* 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) {
Expand Down
12 changes: 8 additions & 4 deletions tests/Settings/Controller/CheckSetupControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testIsInternetConnectionFail() {
->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));

Expand Down Expand Up @@ -285,13 +285,17 @@ public function testCheck() {
->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))
Expand Down

0 comments on commit 176b4d6

Please sign in to comment.