Changeset 58108
- Timestamp:
- 05/06/2024 06:39:15 PM (7 months ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/base.php
r56548 r58108 220 220 221 221 $this->skipTestOnTimeout( $res ); 222 $this->assertNotWPError( $res ); 222 223 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 223 224 $this->assertNotEmpty( $res['headers']['location'] ); … … 357 358 358 359 $this->skipTestOnTimeout( $res ); 360 $this->assertNotWPError( $res ); 359 361 $this->assertSame( $method, wp_remote_retrieve_body( $res ) ); 360 362 } … … 407 409 408 410 $this->skipTestOnTimeout( $res ); 411 $this->assertNotWPError( $res ); 409 412 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 410 413 } … … 448 451 449 452 $this->skipTestOnTimeout( $res ); 453 $this->assertNotWPError( $res ); 450 454 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 451 455 } -
trunk/tests/phpunit/tests/http/functions.php
r57931 r58108 16 16 17 17 $this->skipTestOnTimeout( $response ); 18 $this->assertNotWPError( $response ); 18 19 19 20 $headers = wp_remote_retrieve_headers( $response ); 20 21 21 22 $this->assertIsArray( $response ); 22 23 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 23 24 $this->assertSame( 'image/png', $headers['Content-Type'] ); 24 25 $this->assertSame( '153204', $headers['Content-Length'] ); 25 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );26 26 } 27 27 … … 35 35 36 36 $this->skipTestOnTimeout( $response ); 37 $this->assertNotWPError( $response ); 37 38 $this->assertSame( 301, wp_remote_retrieve_response_code( $response ) ); 38 39 } … … 46 47 47 48 $this->skipTestOnTimeout( $response ); 49 $this->assertNotWPError( $response ); 48 50 $this->assertSame( 404, wp_remote_retrieve_response_code( $response ) ); 49 51 } … … 60 62 61 63 $this->skipTestOnTimeout( $response ); 64 $this->assertNotWPError( $response ); 62 65 63 66 $headers = wp_remote_retrieve_headers( $response ); 64 67 65 $this->assertIsArray( $response );66 67 68 // Should return the same headers as a HEAD request. 69 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 68 70 $this->assertSame( 'image/png', $headers['Content-Type'] ); 69 71 $this->assertSame( '153204', $headers['Content-Length'] ); 70 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );71 72 } 72 73 … … 83 84 84 85 $this->skipTestOnTimeout( $response ); 86 $this->assertNotWPError( $response ); 85 87 86 88 $headers = wp_remote_retrieve_headers( $response ); 87 89 88 90 // Should return the same headers as a HEAD request. 91 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 89 92 $this->assertSame( 'image/png', $headers['Content-Type'] ); 90 93 $this->assertSame( '153204', $headers['Content-Length'] ); 91 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) );92 94 } 93 95 … … 120 122 121 123 $this->skipTestOnTimeout( $response ); 124 $this->assertNotWPError( $response ); 122 125 123 126 $cookies = wp_remote_retrieve_cookies( $response ); … … 165 168 166 169 $this->skipTestOnTimeout( $response ); 170 $this->assertNotWPError( $response ); 167 171 168 172 $cookies = wp_remote_retrieve_cookies( $response ); … … 196 200 197 201 $this->skipTestOnTimeout( $response ); 202 $this->assertNotWPError( $response ); 198 203 199 204 $cookies = wp_remote_retrieve_cookies( $response ); -
trunk/tests/phpunit/tests/readme.php
r57689 r58108 95 95 96 96 $this->skipTestOnTimeout( $response ); 97 $this->assertNotWPError( $response ); 97 98 98 99 $response_code = wp_remote_retrieve_response_code( $response );
Note: See TracChangeset
for help on using the changeset viewer.