summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-07 13:47:35 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-07 13:47:35 +0200
commit6cc3fd92700fe7a0c778490ddb5fda1beaefb046 (patch)
tree02f7dddec08f677d6cecbc2199876f87ce219df4 /tests
parent9694dabd5ef97455159b05eb91a3146bfbc29130 (diff)
parent81ec1c8a1ad208457eae772a20174abf4f6bafe7 (diff)
downloadnextcloud-server-6cc3fd92700fe7a0c778490ddb5fda1beaefb046.tar.gz
nextcloud-server-6cc3fd92700fe7a0c778490ddb5fda1beaefb046.zip
Merge pull request #15426 from owncloud/issue/15420-remove-hardcoded-docs-link
Remove hardcoded link to performance docs
Diffstat (limited to 'tests')
-rw-r--r--tests/settings/controller/CheckSetupControllerTest.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/settings/controller/CheckSetupControllerTest.php b/tests/settings/controller/CheckSetupControllerTest.php
index fc17d2adc49..26f9f4e9459 100644
--- a/tests/settings/controller/CheckSetupControllerTest.php
+++ b/tests/settings/controller/CheckSetupControllerTest.php
@@ -22,11 +22,12 @@
namespace OC\Settings\Controller;
use OCP\AppFramework\Http\DataResponse;
-use Test\TestCase;
-use OCP\IRequest;
-use OCP\IConfig;
use OCP\Http\Client\IClientService;
+use OCP\IConfig;
+use OCP\IRequest;
+use OCP\IURLGenerator;
use OC_Util;
+use Test\TestCase;
/**
* Class CheckSetupControllerTest
@@ -42,6 +43,8 @@ class CheckSetupControllerTest extends TestCase {
private $config;
/** @var IClientService */
private $clientService;
+ /** @var IURLGenerator */
+ private $urlGenerator;
/** @var OC_Util */
private $util;
@@ -58,12 +61,15 @@ class CheckSetupControllerTest extends TestCase {
->disableOriginalConstructor()->getMock();
$this->util = $this->getMockBuilder('\OC_Util')
->disableOriginalConstructor()->getMock();
+ $this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')
+ ->disableOriginalConstructor()->getMock();
$this->checkSetupController = new CheckSetupController(
'settings',
$this->request,
$this->config,
$this->clientService,
+ $this->urlGenerator,
$this->util
);
}
@@ -218,12 +224,17 @@ class CheckSetupControllerTest extends TestCase {
$this->util->expects($this->once())
->method('isHtaccessWorking')
->will($this->returnValue(true));
+ $this->urlGenerator->expects($this->once())
+ ->method('linkToDocs')
+ ->with('admin-performance')
+ ->willReturn('http://doc.owncloud.org/server/go.php?to=admin-performance');
$expected = new DataResponse(
[
'serverHasInternetConnection' => false,
'dataDirectoryProtected' => true,
'isMemcacheConfigured' => true,
+ 'memcacheDocs' => 'http://doc.owncloud.org/server/go.php?to=admin-performance',
]
);
$this->assertEquals($expected, $this->checkSetupController->check());