diff options
Diffstat (limited to 'tests/PHPUnit/Integration/HttpTest.php')
-rw-r--r-- | tests/PHPUnit/Integration/HttpTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/PHPUnit/Integration/HttpTest.php b/tests/PHPUnit/Integration/HttpTest.php index 1fdec7b6ed..371ad82459 100644 --- a/tests/PHPUnit/Integration/HttpTest.php +++ b/tests/PHPUnit/Integration/HttpTest.php @@ -229,6 +229,33 @@ class HttpTest extends \PHPUnit_Framework_TestCase /** * @dataProvider getMethodsToTest */ + public function testHttpCustomHeaders($method) + { + $result = Http::sendHttpRequestBy( + $method, + Fixture::getRootUrl() . 'tests/PHPUnit/Integration/Http/AdditionalHeaders.php', + 30, + $userAgent = null, + $destinationPath = null, + $file = null, + $followDepth = 0, + $acceptLanguage = false, + $acceptInvalidSslCertificate = false, + $byteRange = false, + $getExtendedInfo = false, + $httpMethod = 'POST', + $httpUsername = '', + $httpPassword = '', + array(), + array('CustomHeader: customdata') + ); + + $this->assertEquals('customdata', $result); + } + + /** + * @dataProvider getMethodsToTest + */ public function testHttpsWorksWithValidCertificate($method) { $result = Http::sendHttpRequestBy($method, 'https://builds.piwik.org/LATEST', 10); |