mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Coding Standards: Fix the remaining issues in /tests.
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked. Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉 See #47632. git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -54,7 +54,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
|
||||
// Disable all transports aside from this one.
|
||||
foreach ( array( 'curl', 'streams', 'fsockopen' ) as $t ) {
|
||||
remove_filter( "use_{$t}_transport", '__return_false' ); // Just strip them all
|
||||
if ( $t != $this->transport ) {
|
||||
if ( $t !== $this->transport ) {
|
||||
add_filter( "use_{$t}_transport", '__return_false' ); // and add it back if need be..
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
|
||||
$headers[ $parts[0] ] = $parts[1];
|
||||
}
|
||||
|
||||
$this->assertTrue( isset( $headers['test1'] ) && 'test' == $headers['test1'] );
|
||||
$this->assertTrue( isset( $headers['test1'] ) && 'test' === $headers['test1'] );
|
||||
$this->assertTrue( isset( $headers['test2'] ) && '0' === $headers['test2'] );
|
||||
// cURL/HTTP Extension Note: Will never pass, cURL does not pass headers with an empty value.
|
||||
// Should it be that empty headers with empty values are NOT sent?
|
||||
|
||||
Reference in New Issue
Block a user