From bc451880e52fff331fdc67642760e7d45460c2d9 Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Sat, 26 Sep 2015 00:39:51 +0000 Subject: [PATCH] Stop hitting SVN for http tests The automated tests can fail due to svn. Change the tests to use a WordPress CDN image. see #33968 git-svn-id: https://develop.svn.wordpress.org/trunk@34568 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/http/base.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/phpunit/tests/http/base.php b/tests/phpunit/tests/http/base.php index 10d96ce0c9..54764b78af 100644 --- a/tests/phpunit/tests/http/base.php +++ b/tests/phpunit/tests/http/base.php @@ -13,6 +13,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { // You can use your own version of data/WPHTTP-testcase-redirection-script.php here. var $redirection_script = 'http://api.wordpress.org/core/tests/1.0/redirection.php'; + var $fileStreamUrl = 'https://s.w.org/screenshots/3.9/dashboard.png'; function setUp() { @@ -180,8 +181,8 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { } function test_file_stream() { - $url = 'http://unit-tests.svn.wordpress.org/trunk/data/images/2004-07-22-DSC_0007.jpg'; // we'll test against a file in the unit test data - $size = 87348; + $url = $this->fileStreamUrl; + $size = 153204; $res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30 ) ); //Auto generate the filename. // Cleanup before we assert, as it'll return early. @@ -201,7 +202,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { * @ticket 26726 */ function test_file_stream_limited_size() { - $url = 'http://unit-tests.svn.wordpress.org/trunk/data/images/2004-07-22-DSC_0007.jpg'; // we'll test against a file in the unit test data + $url = $this->fileStreamUrl; $size = 10000; $res = wp_remote_request( $url, array( 'stream' => true, 'timeout' => 30, 'limit_response_size' => $size ) ); //Auto generate the filename. @@ -222,8 +223,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase { * @ticket 31172 */ function test_request_limited_size() { - // we'll test against a file in the unit test data - $url = 'http://develop.svn.wordpress.org/trunk/tests/phpunit/data/images/2004-07-22-DSC_0007.jpg'; + $url = $this->fileStreamUrl; $size = 10000; $res = wp_remote_request( $url, array( 'timeout' => 30, 'limit_response_size' => $size ) );