diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-03-16 11:28:23 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-03-25 16:04:41 +0100 |
commit | 5f044ebf1bc6f45acec2e79dc05185acd0405f42 (patch) | |
tree | 8bc8797ef55588d3aab1b160acb3e2f5576d460f /tests/lib/httphelper.php | |
parent | 13904a7f8979a87492ac765e05017eb1e4b69588 (diff) | |
download | nextcloud-server-5f044ebf1bc6f45acec2e79dc05185acd0405f42.tar.gz nextcloud-server-5f044ebf1bc6f45acec2e79dc05185acd0405f42.zip |
Add wrapper for Guzzle
Diffstat (limited to 'tests/lib/httphelper.php')
-rw-r--r-- | tests/lib/httphelper.php | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/tests/lib/httphelper.php b/tests/lib/httphelper.php index fe76f984258..e8472ab553a 100644 --- a/tests/lib/httphelper.php +++ b/tests/lib/httphelper.php @@ -12,17 +12,15 @@ class TestHTTPHelper extends \Test\TestCase { private $config; /** @var \OC\HTTPHelper */ private $httpHelperMock; - /** @var \OC\Security\CertificateManager */ - private $certificateManager; protected function setUp() { parent::setUp(); $this->config = $this->getMockBuilder('\OCP\IConfig') ->disableOriginalConstructor()->getMock(); - $this->certificateManager = $this->getMock('\OCP\ICertificateManager'); + $clientService = $this->getMock('\OCP\Http\Client\IClientService'); $this->httpHelperMock = $this->getMockBuilder('\OC\HTTPHelper') - ->setConstructorArgs(array($this->config, $this->certificateManager)) + ->setConstructorArgs(array($this->config, $clientService)) ->setMethods(array('getHeaders')) ->getMock(); } @@ -46,21 +44,4 @@ class TestHTTPHelper extends \Test\TestCase { public function testIsHTTP($url, $expected) { $this->assertSame($expected, $this->httpHelperMock->isHTTPURL($url)); } - - /** - * @dataProvider postParameters - */ - public function testAssemblePostParameters($parameterList, $expectedResult) { - $helper = \OC::$server->getHTTPHelper(); - $result = \Test_Helper::invokePrivate($helper, 'assemblePostParameters', array($parameterList)); - $this->assertSame($expectedResult, $result); - } - - public function postParameters() { - return array( - array(array('k1' => 'v1'), 'k1=v1'), - array(array('k1' => 'v1', 'k2' => 'v2'), 'k1=v1&k2=v2'), - array(array(), ''), - ); - } } |