diff options
Diffstat (limited to 'tests/lib/Http/Client/ClientServiceTest.php')
-rw-r--r-- | tests/lib/Http/Client/ClientServiceTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/lib/Http/Client/ClientServiceTest.php b/tests/lib/Http/Client/ClientServiceTest.php new file mode 100644 index 00000000000..3c406f30111 --- /dev/null +++ b/tests/lib/Http/Client/ClientServiceTest.php @@ -0,0 +1,27 @@ +<?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 OC\Http\Client\Client; +use OC\Http\Client\ClientService; + +/** + * Class ClientServiceTest + */ +class ClientServiceTest extends \Test\TestCase { + public function testNewClient() { + $config = $this->getMock('\OCP\IConfig'); + $certificateManager = $this->getMock('\OCP\ICertificateManager'); + + $expected = new Client($config, $certificateManager, new GuzzleClient()); + $clientService = new ClientService($config, $certificateManager); + $this->assertEquals($expected, $clientService->newClient()); + } +} |