Changeset 48937 for trunk/tests/phpunit/tests/http/functions.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/functions.php
r47122 r48937 26 26 $this->assertInternalType( 'array', $response ); 27 27 28 $this->assert Equals( 'image/jpeg', $headers['content-type'] );29 $this->assert Equals( '40148', $headers['content-length'] );30 $this->assert Equals( '200', wp_remote_retrieve_response_code( $response ) );28 $this->assertSame( 'image/jpeg', $headers['content-type'] ); 29 $this->assertSame( '40148', $headers['content-length'] ); 30 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 31 31 } 32 32 … … 37 37 38 38 $this->skipTestOnTimeout( $response ); 39 $this->assert Equals( '301', wp_remote_retrieve_response_code( $response ) );39 $this->assertSame( 301, wp_remote_retrieve_response_code( $response ) ); 40 40 } 41 41 … … 45 45 46 46 $this->skipTestOnTimeout( $response ); 47 $this->assert Equals( '404', wp_remote_retrieve_response_code( $response ) );47 $this->assertSame( 404, wp_remote_retrieve_response_code( $response ) ); 48 48 } 49 49 … … 60 60 61 61 // Should return the same headers as a HEAD request. 62 $this->assert Equals( 'image/jpeg', $headers['content-type'] );63 $this->assert Equals( '40148', $headers['content-length'] );64 $this->assert Equals( '200', wp_remote_retrieve_response_code( $response ) );62 $this->assertSame( 'image/jpeg', $headers['content-type'] ); 63 $this->assertSame( '40148', $headers['content-length'] ); 64 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 65 65 } 66 66 … … 76 76 77 77 // Should return the same headers as a HEAD request. 78 $this->assert Equals( 'image/jpeg', $headers['content-type'] );79 $this->assert Equals( '40148', $headers['content-length'] );80 $this->assert Equals( '200', wp_remote_retrieve_response_code( $response ) );78 $this->assertSame( 'image/jpeg', $headers['content-type'] ); 79 $this->assertSame( '40148', $headers['content-length'] ); 80 $this->assertSame( 200, wp_remote_retrieve_response_code( $response ) ); 81 81 } 82 82 … … 197 197 // Check the host_only flag in the resulting WP_Http_Cookie. 198 198 $cookie = wp_remote_retrieve_cookie( $response, 'test' ); 199 $this->assert Equals( $cookie->domain, 'wordpress.org' );199 $this->assertSame( $cookie->domain, 'wordpress.org' ); 200 200 $this->assertFalse( $cookie->host_only, 'host-only flag not set' ); 201 201
Note: See TracChangeset
for help on using the changeset viewer.