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.

git-svn-id: https://develop.svn.wordpress.org/trunk@35211 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2015-10-15 21:30:52 +00:00
parent c8bf2ce727
commit c6e2e6c1b5
5 changed files with 2 additions and 19 deletions

View File

@ -50,21 +50,6 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
'wp-remove-post-lock', 'dismiss-wp-pointer', 'heartbeat', 'nopriv_heartbeat',
);
/**
* Don't preserve the global state when using an external object cache.
*
* Most of the Ajax tests are running in a separate PHP process, and thus PHPUnit attempts
* to preserve the global state from the parent process by serializing all globals.
* But this doesn't work for external object caches so we have to disable this "feature".
*/
public function run( PHPUnit_Framework_TestResult $result = NULL ) {
if ( wp_using_ext_object_cache() ) {
$this->setPreserveGlobalState( false );
}
return parent::run( $result );
}
/**
* Set up the test fixture.
* Override wp_die(), pretend to be ajax, and suppres E_WARNINGs

View File

@ -12,7 +12,6 @@ require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
* @subpackage UnitTests
* @since 3.4.0
* @group ajax
* @runTestsInSeparateProcesses
*/
class Tests_Ajax_Autosave extends WP_Ajax_UnitTestCase {

View File

@ -12,7 +12,6 @@ require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
* @subpackage UnitTests
* @since 3.4.0
* @group ajax
* @runTestsInSeparateProcesses
*/
class Tests_Ajax_CompressionTest extends WP_Ajax_UnitTestCase {

View File

@ -6,7 +6,6 @@
* @subpackage UnitTests
* @since 4.3.0
* @group ajax
* @runTestsInSeparateProcesses
*/
class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase {

View File

@ -6,7 +6,6 @@
* @subpackage UnitTests
* @since 3.5.0
* @group ajax
* @runInSeparateProcess
*/
class Tests_Ajax_Response extends WP_UnitTestCase {
@ -65,6 +64,8 @@ class Tests_Ajax_Response extends WP_UnitTestCase {
* Needs a separate process to get around the headers/output from the
* bootstrapper
* @ticket 19448
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
public function test_response_charset_in_header() {