diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-09-02 08:16:27 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-02 08:16:27 +0200 |
commit | c86cac6a2b2c269df41f4133e8f918cbb8aca28a (patch) | |
tree | ee00d15a5b0811ef1494b31ca192f7b796d5694f /tests | |
parent | 310084cc25b63ce05b208a426d54e34a2790a6b4 (diff) | |
download | nextcloud-server-c86cac6a2b2c269df41f4133e8f918cbb8aca28a.tar.gz nextcloud-server-c86cac6a2b2c269df41f4133e8f918cbb8aca28a.zip |
use config.php value instead of version string
Diffstat (limited to 'tests')
-rw-r--r-- | tests/settings/controller/CheckSetupControllerTest.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/settings/controller/CheckSetupControllerTest.php b/tests/settings/controller/CheckSetupControllerTest.php index 414b1b91e17..2a8a6548ebb 100644 --- a/tests/settings/controller/CheckSetupControllerTest.php +++ b/tests/settings/controller/CheckSetupControllerTest.php @@ -384,6 +384,11 @@ class CheckSetupControllerTest extends TestCase { } public function testIsUsedTlsLibOutdatedWithOlderOpenSsl() { + $this->config + ->expects($this->once()) + ->method('getSystemValue') + ->with('appstoreenabled', true) + ->will($this->returnValue(true)); $this->checkSetupController ->expects($this->once()) ->method('getCurlVersion') @@ -391,7 +396,25 @@ class CheckSetupControllerTest extends TestCase { $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as installing and updating apps via the app store or Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); } + public function testIsUsedTlsLibOutdatedWithOlderOpenSslAndWithoutAppstore() { + $this->config + ->expects($this->once()) + ->method('getSystemValue') + ->with('appstoreenabled', true) + ->will($this->returnValue(false)); + $this->checkSetupController + ->expects($this->once()) + ->method('getCurlVersion') + ->will($this->returnValue(['ssl_version' => 'OpenSSL/1.0.1c'])); + $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); + } + public function testIsUsedTlsLibOutdatedWithOlderOpenSsl1() { + $this->config + ->expects($this->once()) + ->method('getSystemValue') + ->with('appstoreenabled', true) + ->will($this->returnValue(true)); $this->checkSetupController ->expects($this->once()) ->method('getCurlVersion') @@ -416,6 +439,11 @@ class CheckSetupControllerTest extends TestCase { } public function testIsBuggyNss400() { + $this->config + ->expects($this->once()) + ->method('getSystemValue') + ->with('appstoreenabled', true) + ->will($this->returnValue(true)); $this->checkSetupController ->expects($this->once()) ->method('getCurlVersion') |