Ping more privacy respecting organizations
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
feef3cbba0
commit
176b4d6832
|
@ -104,8 +104,10 @@ class CheckSetupController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
$siteArray = ['www.nextcloud.com',
|
$siteArray = ['www.nextcloud.com',
|
||||||
'www.google.com',
|
'www.startpage.com',
|
||||||
'www.github.com'];
|
'www.eff.org',
|
||||||
|
'www.edri.org',
|
||||||
|
];
|
||||||
|
|
||||||
foreach($siteArray as $site) {
|
foreach($siteArray as $site) {
|
||||||
if ($this->isSiteReachable($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
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function isSiteReachable($sitename) {
|
private function isSiteReachable($sitename) {
|
||||||
|
|
|
@ -150,7 +150,7 @@ class CheckSetupControllerTest extends TestCase {
|
||||||
->method('get')
|
->method('get')
|
||||||
->will($this->throwException(new \Exception()));
|
->will($this->throwException(new \Exception()));
|
||||||
|
|
||||||
$this->clientService->expects($this->exactly(3))
|
$this->clientService->expects($this->exactly(4))
|
||||||
->method('newClient')
|
->method('newClient')
|
||||||
->will($this->returnValue($client));
|
->will($this->returnValue($client));
|
||||||
|
|
||||||
|
@ -285,13 +285,17 @@ class CheckSetupControllerTest extends TestCase {
|
||||||
->will($this->throwException(new \Exception()));
|
->will($this->throwException(new \Exception()));
|
||||||
$client->expects($this->at(1))
|
$client->expects($this->at(1))
|
||||||
->method('get')
|
->method('get')
|
||||||
->with('http://www.google.com/', [])
|
->with('http://www.startpage.com/', [])
|
||||||
->will($this->throwException(new \Exception()));
|
->will($this->throwException(new \Exception()));
|
||||||
$client->expects($this->at(2))
|
$client->expects($this->at(2))
|
||||||
->method('get')
|
->method('get')
|
||||||
->with('http://www.github.com/', [])
|
->with('http://www.eff.org/', [])
|
||||||
->will($this->throwException(new \Exception()));
|
->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')
|
->method('newClient')
|
||||||
->will($this->returnValue($client));
|
->will($this->returnValue($client));
|
||||||
$this->urlGenerator->expects($this->at(0))
|
$this->urlGenerator->expects($this->at(0))
|
||||||
|
|
Loading…
Reference in New Issue