diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-07 11:11:31 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-04-07 12:25:30 +0200 |
commit | 81ec1c8a1ad208457eae772a20174abf4f6bafe7 (patch) | |
tree | 359adb19cb7a4dbe922d22733fa41537ea12e11a /tests/settings | |
parent | 95e55aa4adb690947ff73f2c703dac7010ed2cae (diff) | |
download | nextcloud-server-81ec1c8a1ad208457eae772a20174abf4f6bafe7.tar.gz nextcloud-server-81ec1c8a1ad208457eae772a20174abf4f6bafe7.zip |
Remove hardcoded link to performance docs
Diffstat (limited to 'tests/settings')
-rw-r--r-- | tests/settings/controller/CheckSetupControllerTest.php | 17 |
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()); |