adjust tests

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-10-15 18:40:14 +02:00
parent 0f5cc5249c
commit 29a1ac7799
No known key found for this signature in database
GPG key ID: 7424F1874854DF23

View file

@ -49,27 +49,22 @@ class ClientTest extends \Test\TestCase {
$this->config
->expects($this->at(0))
->method('getSystemValue')
->with('proxy', null)
->willReturn(null);
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('proxyuserpwd', null)
->willReturn(null);
$this->assertSame('', self::invokePrivate($this->client, 'getProxyUri'));
->with('proxy', '')
->willReturn('');
$this->assertNull(self::invokePrivate($this->client, 'getProxyUri'));
}
public function testGetProxyUriProxyHostEmptyPassword() {
$this->config
->expects($this->at(0))
->method('getSystemValue')
->with('proxy', null)
->with('proxy', '')
->willReturn('foo');
$this->config
->expects($this->at(1))
->method('getSystemValue')
->with('proxyuserpwd', null)
->willReturn(null);
->with('proxyuserpwd', '')
->willReturn('');
$this->assertSame('foo', self::invokePrivate($this->client, 'getProxyUri'));
}
@ -270,7 +265,8 @@ class ClientTest extends \Test\TestCase {
->willReturn([]);
$this->assertEquals([
'verify' => \OC::$SERVERROOT . '/resources/config/ca-bundle.crt'
'verify' => \OC::$SERVERROOT . '/resources/config/ca-bundle.crt',
'proxy' => null,
], self::invokePrivate($this->client, 'getRequestOptions'));
}