From 5855108e9b413c69b95dcd68972cac7f4f01f4cc Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Thu, 12 Mar 2015 21:43:41 +0100 Subject: drop any fallback code related to curl - refs https://github.com/owncloud/core/pull/14838#issuecomment-78586447 --- tests/lib/httphelper.php | 48 +----------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) (limited to 'tests/lib') diff --git a/tests/lib/httphelper.php b/tests/lib/httphelper.php index 48d6543f1f2..fe76f984258 100644 --- a/tests/lib/httphelper.php +++ b/tests/lib/httphelper.php @@ -40,49 +40,6 @@ class TestHTTPHelper extends \Test\TestCase { ); } - /** - * Note: Not using a dataprovider because onConsecutiveCalls expects not - * an array but the function arguments directly - */ - public function testGetFinalLocationOfURLValid() { - $url = 'https://www.owncloud.org/enterprise/'; - $expected = 'https://www.owncloud.com/enterprise/'; - $this->httpHelperMock->expects($this->any()) - ->method('getHeaders') - ->will($this->onConsecutiveCalls( - array('Location' => 'http://www.owncloud.com/enterprise/'), - array('Location' => 'https://www.owncloud.com/enterprise/') - )); - $result = $this->httpHelperMock->getFinalLocationOfURL($url); - $this->assertSame($expected, $result); - } - - /** - * Note: Not using a dataprovider because onConsecutiveCalls expects not - * an array but the function arguments directly - */ - public function testGetFinalLocationOfURLInvalid() { - $url = 'https://www.owncloud.org/enterprise/'; - $expected = 'http://www.owncloud.com/enterprise/'; - $this->httpHelperMock->expects($this->any()) - ->method('getHeaders') - ->will($this->onConsecutiveCalls( - array('Location' => 'http://www.owncloud.com/enterprise/'), - array('Location' => 'file://etc/passwd'), - array('Location' => 'http://www.example.com/') - )); - $result = $this->httpHelperMock->getFinalLocationOfURL($url); - $this->assertSame($expected, $result); - } - - /** - * @expectedException \Exception - * @expectedExceptionMessage URL must begin with HTTPS or HTTP. - */ - public function testGetFinalLocationOfURLException() { - $this->httpHelperMock->getFinalLocationOfURL('file://etc/passwd'); - } - /** * @dataProvider isHttpTestData */ @@ -90,11 +47,10 @@ class TestHTTPHelper extends \Test\TestCase { $this->assertSame($expected, $this->httpHelperMock->isHTTPURL($url)); } - /** * @dataProvider postParameters */ - public function testassemblePostParameters($parameterList, $expectedResult) { + public function testAssemblePostParameters($parameterList, $expectedResult) { $helper = \OC::$server->getHTTPHelper(); $result = \Test_Helper::invokePrivate($helper, 'assemblePostParameters', array($parameterList)); $this->assertSame($expectedResult, $result); @@ -107,6 +63,4 @@ class TestHTTPHelper extends \Test\TestCase { array(array(), ''), ); } - - } -- cgit v1.2.3