adjust tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
0f5cc5249c
commit
29a1ac7799
1 changed files with 8 additions and 12 deletions
|
@ -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'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue