Changeset 34639 for trunk/tests/phpunit/tests/http/base.php
- Timestamp:
- 09/27/2015 09:37:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/base.php
r34600 r34639 16 16 var $fileStreamUrl = 'http://s.w.org/screenshots/3.9/dashboard.png'; 17 17 18 protected $http_request_args; 19 18 20 function setUp() { 19 21 … … 41 43 } 42 44 parent::tearDown(); 45 } 46 47 function filter_http_request_args( array $args ) { 48 $this->http_request_args = $args; 49 return $args; 43 50 } 44 51 … … 284 291 285 292 /** 293 * Test HTTP requests where SSL verification is disabled but the CA bundle is still populated 294 * 295 * @ticket 33978 296 */ 297 function test_https_url_without_ssl_verification() { 298 $url = 'https://wordpress.org/'; 299 $args = array( 300 'sslverify' => false, 301 ); 302 303 add_filter( 'http_request_args', array( $this, 'filter_http_request_args' ) ); 304 305 $res = wp_remote_head( $url, $args ); 306 307 remove_filter( 'http_request_args', array( $this, 'filter_http_request_args' ) ); 308 309 $this->assertNotEmpty( $this->http_request_args['sslcertificates'] ); 310 $this->assertNotWPError( $res ); 311 } 312 313 /** 286 314 * Test HTTP Redirects with multiple Location headers specified 287 315 *
Note: See TracChangeset
for help on using the changeset viewer.