Make WordPress Core

Ticket #35426: 35426.tests.diff

File 35426.tests.diff, 676 bytes (added by johnbillion, 9 years ago)
  • tests/phpunit/tests/http/http.php

     
    102102                  - ://example.com - assumed path in PHP >= 5.4.7, fails in <5.4.7
    103103                */
    104104        }
     105
     106        public function test_http_response_code_constants() {
     107                global $wp_header_to_desc;
     108
     109                $ref = new ReflectionClass( 'WP_Http' );
     110                $constants = $ref->getConstants();
     111
     112                // This primes the `$wp_header_to_desc` global:
     113                get_status_header_desc( 200 );
     114
     115                $this->assertEquals( array_keys( $wp_header_to_desc ), array_values( $constants ) );
     116
     117        }
    105118}