ClientServiceTest.php 818 B

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