]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix testGetProxyUri 14363/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 16 Apr 2019 19:27:03 +0000 (21:27 +0200)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 16 Apr 2019 19:33:56 +0000 (21:33 +0200)
Changed the implementation for getProxyUri with
https://github.com/nextcloud/server/pull/14363/commits/fd1d85365cb1368fa70263fe3ae3b8e59ab56615

If proxy is already null then we don't ask for proxyuserpwd. Test
failed because we expected getSystemValue to be called once with
proxyuserpwd

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
tests/lib/Http/Client/ClientTest.php

index 2fd23346398e67e13117b750002edea9f762fec4..f43958ab865de0b021eaa96b108e42c7a53a58ab 100644 (file)
@@ -49,11 +49,6 @@ class ClientTest extends \Test\TestCase {
                        ->method('getSystemValue')
                        ->with('proxy', null)
                        ->willReturn(null);
-               $this->config
-                       ->expects($this->at(1))
-                       ->method('getSystemValue')
-                       ->with('proxyuserpwd', null)
-                       ->willReturn(null);
                $this->assertNull(self::invokePrivate($this->client, 'getProxyUri'));
        }
 
@@ -269,7 +264,7 @@ class ClientTest extends \Test\TestCase {
 
        public function testSetDefaultOptionsWithNotInstalled(): void {
                $this->config
-                       ->expects($this->at(2))
+                       ->expects($this->at(1))
                        ->method('getSystemValue')
                        ->with('installed', false)
                        ->willReturn(false);