blob: 1bfaf0503555d62b8618235b222021256ee29e98 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
/**
* Copyright (c) 2015 Lukas Reschke <lukas@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
namespace Test\Http\Client;
use GuzzleHttp\Client as GuzzleClient;
use GuzzleHttp\HandlerStack;
use OC\Http\Client\Client;
use OC\Http\Client\ClientService;
use OCP\ICertificateManager;
use OCP\IConfig;
/**
* Class ClientServiceTest
*/
class ClientServiceTest extends \Test\TestCase {
public function testNewClient() {
$config = $this->createMock(IConfig::class);
$certificateManager = $this->createMock(ICertificateManager::class);
$expected = new Client($config, $certificateManager, new GuzzleClient(), HandlerStack::create());
$clientService = new ClientService($config, $certificateManager);
$this->assertEquals($expected, $clientService->newClient());
}
}
|