forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcurl.php
More file actions
34 lines (30 loc) · 915 Bytes
/
curl.php
File metadata and controls
34 lines (30 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
require_once __DIR__ . '/base.php';
/**
* @group http
* @group external-http
*/
class Tests_HTTP_curl extends WP_HTTP_UnitTestCase {
public $transport = 'curl';
/**
* @ticket 39783
*
* @covers ::wp_remote_request
*/
public function test_http_api_curl_stream_parameter_is_a_reference() {
add_action( 'http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10, 3 );
wp_remote_request(
$this->file_stream_url,
array(
'stream' => true,
'timeout' => 30,
)
);
remove_action( 'http_api_curl', array( $this, '_action_test_http_api_curl_stream_parameter_is_a_reference' ), 10 );
}
public function _action_test_http_api_curl_stream_parameter_is_a_reference( &$stream, $r, $url ) {
// $stream not being a reference will cause a PHP warning.
// For counting tests purposes, let's do a fake assert.
$this->assertTrue( true );
}
}