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:
Gary Pendergast
2019-07-08 00:55:20 +00:00
parent 431bc58a48
commit c6c78490e2
91 changed files with 435 additions and 320 deletions
+2 -2
View File
@@ -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?