wordpress-develop/tests/phpunit/tests/http/curl.php
Sergey Biryukov 4e4b4de3be Tests: Add missing @covers tags for files in phpunit/tests/http/.
Props patopaiar, jrf.
See #39265.

git-svn-id: https://develop.svn.wordpress.org/trunk@50344 602fd350-edb4-49c9-b593-d223f7449a82
2021-02-15 14:00:02 +00:00

35 lines
915 B
PHP

<?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 );
}
}