Changeset 57903
- Timestamp:
- 04/01/2024 01:55:59 PM (7 months ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/functions/wpRemoteFopen.php
r56971 r57903 28 28 public function test_wp_remote_fopen() { 29 29 // This URL gives a direct 200 response. 30 $url = 'https://asdftestblog1. files.wordpress.com/2007/09/2007-06-30-dsc_4700-1.jpg';30 $url = 'https://asdftestblog1.wordpress.com/wp-content/uploads/2007/09/2007-06-30-dsc_4700-1.jpg'; 31 31 $response = wp_remote_fopen( $url ); 32 32 33 33 $this->assertIsString( $response ); 34 $this->assertSame( 40148, strlen( $response ) );34 $this->assertSame( 31325, strlen( $response ) ); 35 35 } 36 36 } -
trunk/tests/phpunit/tests/http/functions.php
r55210 r57903 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.