summaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:43:41 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-12 21:43:41 +0100
commit5855108e9b413c69b95dcd68972cac7f4f01f4cc (patch)
tree999b505632dfdb59a7b0bcb335417115ede9b3e4 /tests/lib
parent68a7041348e592a8c8e35458a2355b0da2d99f79 (diff)
downloadnextcloud-server-5855108e9b413c69b95dcd68972cac7f4f01f4cc.tar.gz
nextcloud-server-5855108e9b413c69b95dcd68972cac7f4f01f4cc.zip
drop any fallback code related to curl - refs https://github.com/owncloud/core/pull/14838#issuecomment-78586447
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/httphelper.php48
1 files changed, 1 insertions, 47 deletions
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
@@ -41,60 +41,16 @@ 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
*/
public function testIsHTTP($url, $expected) {
$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(), ''),
);
}
-
-
}