Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
adjust tests
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Oct 15, 2019
commit 29a1ac7799ea1af20a3635db6f240422e19b495b
20 changes: 8 additions & 12 deletions tests/lib/Http/Client/ClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,22 @@ public function testGetProxyUri() {
$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'));
}

Expand Down Expand Up @@ -270,7 +265,8 @@ public function testSetDefaultOptionsWithNotInstalled() {
->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'));
}

Expand Down