WordPress.org

Make WordPress Core

Changeset 924 in tests for trunk/bootstrap.php


Ignore:
Timestamp:
07/19/2012 06:18:12 PM (9 years ago)
Author:
nacin
Message:

By default, do not execute the ajax tests. They are slow due to the requirement that they run in a separate process for DOING_AJAX reasons.

As they will be run separately, stop running ajax tests in a separate process. The exception is autosave, which has DOING_AUTOSAVE.

When the full test suite is run as plain phpunit, add a message to remind the developer that ajax was not run.

see #49, see #42.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootstrap.php

    r918 r924  
    100100            array_keys( $this->longOptions )
    101101        );
     102        if ( empty( $options[0] ) ) {
     103            register_shutdown_function( array( __CLASS__, 'ajaxTestsWereNotRun' ) );
     104            return;
     105        }
    102106        foreach ( $options[0] as $option ) {
    103107            if ( $option[0] !== '--group' )
     
    110114        }
    111115    }
     116
     117    static function ajaxTestsWereNotRun() {
     118        echo PHP_EOL . 'By default, Ajax tests are not run. To execute these, use `phpunit --group ajax`' . PHP_EOL;
     119    }
    112120}
    113121new WP_PHPUnit_TextUI_Command( $_SERVER['argv'] );
Note: See TracChangeset for help on using the changeset viewer.