Make WordPress Core

Changeset 975 in tests


Ignore:
Timestamp:
08/20/2012 06:15:05 AM (12 years ago)
Author:
kurtpayne
Message:

On some systems, the output from the bootstrapper causes the headers (Content-type: text/html) to exist
and pre-empt any headers output by the ajax response class. Running this one method (not the whole test)
in a separate process resolves this. This updates commit [972]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ajax/Response.php

    r972 r975  
    11<?php
    2 
    32/**
    43 * Testing ajax response class
     
    6362     * Note:  headers_list doesn't work properly in CLI mode, fall back on
    6463     * xdebug_get_headers if it's available
     64     * Needs a separate process to get around the headers/output from the
     65     * bootstrapper
    6566     * @ticket 19448
     67     * @runInSeparateProcess
    6668     */
    6769    public function test_response_charset_in_header() {
     
    7072            $this->markTestSkipped( 'xdebug is required for this test' );
    7173        }
    72        
     74
    7375        // Generate an ajax response
    7476        ob_start();
     
    7981        $headers = xdebug_get_headers();
    8082        ob_end_clean();
     83
    8184        $this->assertTrue( in_array( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ), $headers ) );
    8285    }
Note: See TracChangeset for help on using the changeset viewer.