WordPress.org

Make WordPress Core

Changeset 35211


Ignore:
Timestamp:
10/15/2015 09:30:52 PM (5 years ago)
Author:
ocean90
Message:

Tests: Remove the @runTestsInSeparateProcesses annotation for Ajax tests.

They were added 3 years ago in [846/tests] because tests weren't excluded from the normal runs.

Reverts [35209] because it doesn't work with Xdebug.
Tests_Ajax_Response::test_response_charset_in_header is the only test which needs to run in a separate process, see [975/tests].

See #31491.

Location:
trunk/tests/phpunit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/includes/testcase-ajax.php

    r35209 r35211  
    5050        'wp-remove-post-lock', 'dismiss-wp-pointer', 'heartbeat', 'nopriv_heartbeat',
    5151    );
    52 
    53     /**
    54      * Don't preserve the global state when using an external object cache.
    55      *
    56      * Most of the Ajax tests are running in a separate PHP process, and thus PHPUnit attempts
    57      * to preserve the global state from the parent process by serializing all globals.
    58      * But this doesn't work for external object caches so we have to disable this "feature".
    59      */
    60     public function run( PHPUnit_Framework_TestResult $result = NULL ) {
    61         if ( wp_using_ext_object_cache() ) {
    62             $this->setPreserveGlobalState( false );
    63         }
    64 
    65         return parent::run( $result );
    66     }
    6752
    6853    /**
  • trunk/tests/phpunit/tests/ajax/Autosave.php

    r31623 r35211  
    1313 * @since      3.4.0
    1414 * @group      ajax
    15  * @runTestsInSeparateProcesses
    1615 */
    1716class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase {
  • trunk/tests/phpunit/tests/ajax/Compression.php

    r25431 r35211  
    1313 * @since      3.4.0
    1414 * @group      ajax
    15  * @runTestsInSeparateProcesses
    1615 */
    1716class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase {
  • trunk/tests/phpunit/tests/ajax/CustomizeMenus.php

    r33511 r35211  
    77 * @since      4.3.0
    88 * @group      ajax
    9  * @runTestsInSeparateProcesses
    109 */
    1110class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase {
  • trunk/tests/phpunit/tests/ajax/Response.php

    r35209 r35211  
    77 * @since      3.5.0
    88 * @group      ajax
    9  * @runInSeparateProcess
    109 */
    1110class Tests_Ajax_Response extends WP_UnitTestCase {
     
    6665     * bootstrapper
    6766     * @ticket 19448
     67     * @runInSeparateProcess
     68     * @preserveGlobalState disabled
    6869     */
    6970    public function test_response_charset_in_header() {
Note: See TracChangeset for help on using the changeset viewer.