Changeset 57930
- Timestamp:
- 04/04/2024 09:10:39 PM (6 months ago)
- Location:
- branches/6.4
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
-
branches/6.4/tests/phpunit/tests/functions/wpRemoteFopen.php
r51331 r57930 27 27 public function test_wp_remote_fopen() { 28 28 // This URL gives a direct 200 response. 29 $url = 'https://asdftestblog1. files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';29 $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; 30 30 $response = wp_remote_fopen( $url ); 31 31 32 32 $this->assertIsString( $response ); 33 $this->assertSame( 40148, strlen( $response ) );33 $this->assertSame( 31325, strlen( $response ) ); 34 34 } 35 35 } -
branches/6.4/tests/phpunit/tests/http/functions.php
r55210 r57930 12 12 public function test_head_request() { 13 13 // This URL gives a direct 200 response. 14 $url = 'https://asdftestblog1. files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';14 $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; 15 15 $response = wp_remote_head( $url ); 16 16 … … 22 22 23 23 $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); 24 $this->assertSame( ' 40148', $headers['Content-Length'] );24 $this->assertSame( '31325', $headers['Content-Length'] ); 25 25 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 26 26 } … … 42 42 */ 43 43 public function test_head_404() { 44 $url = 'https://asdftestblog1. files.wordpress.com/2007/09/awefasdfawef.jpg';44 $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/awefasdfawef.jpg'; 45 45 $response = wp_remote_head( $url ); 46 46 … … 67 67 // Should return the same headers as a HEAD request. 68 68 $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); 69 $this->assertSame( ' 40148', $headers['Content-Length'] );69 $this->assertSame( '31325', $headers['Content-Length'] ); 70 70 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 71 71 } … … 88 88 // Should return the same headers as a HEAD request. 89 89 $this->assertSame( 'image/jpeg', $headers['Content-Type'] ); 90 $this->assertSame( ' 40148', $headers['Content-Length'] );90 $this->assertSame( '31325', $headers['Content-Length'] ); 91 91 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 92 92 }
Note: See TracChangeset
for help on using the changeset viewer.