Changeset 48937 for trunk/tests/phpunit/tests/http/base.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/http/base.php
r47122 r48937 58 58 $this->skipTestOnTimeout( $res ); 59 59 $this->assertNotWPError( $res ); 60 $this->assert Equals( 200, (int) $res['response']['code'] );60 $this->assertSame( 200, (int) $res['response']['code'] ); 61 61 } 62 62 … … 67 67 $this->skipTestOnTimeout( $res ); 68 68 $this->assertNotWPError( $res ); 69 $this->assert Equals( 200, (int) $res['response']['code'] );69 $this->assertSame( 200, (int) $res['response']['code'] ); 70 70 } 71 71 … … 79 79 $this->skipTestOnTimeout( $res ); 80 80 $this->assertNotWPError( $res ); 81 $this->assert Equals( 301, (int) $res['response']['code'] );81 $this->assertSame( 301, (int) $res['response']['code'] ); 82 82 } 83 83 … … 91 91 $this->skipTestOnTimeout( $res ); 92 92 $this->assertNotWPError( $res ); 93 $this->assert Equals( 302, (int) $res['response']['code'] );93 $this->assertSame( 302, (int) $res['response']['code'] ); 94 94 } 95 95 … … 100 100 $this->skipTestOnTimeout( $res ); 101 101 $this->assertNotWPError( $res ); 102 $this->assert Equals( 200, (int) $res['response']['code'] );102 $this->assertSame( 200, (int) $res['response']['code'] ); 103 103 } 104 104 … … 109 109 $this->skipTestOnTimeout( $res ); 110 110 $this->assertNotWPError( $res ); 111 $this->assert Equals( 302, (int) $res['response']['code'] );111 $this->assertSame( 302, (int) $res['response']['code'] ); 112 112 } 113 113 … … 127 127 $this->skipTestOnTimeout( $res ); 128 128 $this->assertNotWPError( $res ); 129 $this->assert Equals( 200, (int) $res['response']['code'] );129 $this->assertSame( 200, (int) $res['response']['code'] ); 130 130 } 131 131 … … 163 163 $this->skipTestOnTimeout( $res ); 164 164 $this->assertNotWPError( $res ); 165 $this->assert Equals( 302, (int) $res['response']['code'] );165 $this->assertSame( 302, (int) $res['response']['code'] ); 166 166 } 167 167 … … 177 177 $this->skipTestOnTimeout( $res ); 178 178 $this->assertNotWPError( $res ); 179 $this->assert Equals( 'PASS', $res['body'] );179 $this->assertSame( 'PASS', $res['body'] ); 180 180 } 181 181 … … 198 198 199 199 $this->skipTestOnTimeout( $res ); 200 $this->assert Equals( 'PASS', wp_remote_retrieve_body( $res ) );200 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 201 201 $this->assertTrue( ! empty( $res['headers']['location'] ) ); 202 202 } … … 253 253 $this->skipTestOnTimeout( $res ); 254 254 $this->assertNotWPError( $res ); 255 $this->assert Equals( '', $res['body'] ); // The body should be empty.255 $this->assertSame( '', $res['body'] ); // The body should be empty. 256 256 $this->assertEquals( $size, $res['headers']['content-length'] ); // Check the headers are returned (and the size is the same). 257 $this->assert Equals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters.257 $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. 258 258 $this->assertStringStartsWith( get_temp_dir(), $res['filename'] ); // Check it's saving within the temp directory. 259 259 } … … 282 282 $this->skipTestOnTimeout( $res ); 283 283 $this->assertNotWPError( $res ); 284 $this->assert Equals( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters.284 $this->assertSame( $size, $filesize ); // Check that the file is written to disk correctly without any extra characters. 285 285 286 286 } … … 305 305 $this->skipTestOnTimeout( $res ); 306 306 $this->assertNotWPError( $res ); 307 $this->assert Equals( $size, strlen( $res['body'] ) );307 $this->assertSame( $size, strlen( $res['body'] ) ); 308 308 } 309 309 … … 321 321 322 322 $this->skipTestOnTimeout( $res ); 323 $this->assert Equals( $method, wp_remote_retrieve_body( $res ) );323 $this->assertSame( $method, wp_remote_retrieve_body( $res ) ); 324 324 } 325 325 … … 368 368 369 369 $this->skipTestOnTimeout( $res ); 370 $this->assert Equals( 'PASS', wp_remote_retrieve_body( $res ) );370 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 371 371 372 372 } … … 410 410 411 411 $this->skipTestOnTimeout( $res ); 412 $this->assert Equals( 'PASS', wp_remote_retrieve_body( $res ) );412 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 413 413 414 414 } … … 425 425 426 426 $this->skipTestOnTimeout( $res ); 427 $this->assert Equals( 'PASS', wp_remote_retrieve_body( $res ) );427 $this->assertSame( 'PASS', wp_remote_retrieve_body( $res ) ); 428 428 } 429 429
Note: See TracChangeset
for help on using the changeset viewer.