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:
committed by
Dan Poltawski
parent
cdca00ca81
commit
c5bc16fe8a
+2
-2
@@ -2683,7 +2683,7 @@ class curl {
|
||||
public $emulateredirects = null;
|
||||
|
||||
/** @var array cURL options */
|
||||
protected $options;
|
||||
private $options;
|
||||
|
||||
/** @var string Proxy host */
|
||||
private $proxy_host = '';
|
||||
@@ -2976,7 +2976,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
|
||||
|
||||
Reference in New Issue
Block a user