MDL-49497 curl: keep api private and test it using reflection.

While strictly we should not be testing private APIs, in order
to get this backported to stables without changing visibility
we use reflection to access to such private properties and methods.

Also added one exttest to verify user agent is properly sent.

Finally, fix some wrong whitespace and changed the helper class name
to better alternative.
This commit is contained in:
Eloy Lafuente (stronk7)
2015-06-23 16:25:59 +01:00
committed by Dan Poltawski
parent 54659b0a06
commit 17d14ff177
2 changed files with 53 additions and 13 deletions
+2 -2
View File
@@ -2873,7 +2873,7 @@ class curl {
public $emulateredirects = null;
/** @var array cURL options */
protected $options;
private $options;
/** @var string Proxy host */
private $proxy_host = '';
@@ -3166,7 +3166,7 @@ class curl {
* @param array $options
* @return resource The curl handle
*/
protected function apply_opt($curl, $options) {
private function apply_opt($curl, $options) {
// Clean up
$this->cleanopt();
// set cookie