Make WordPress Core

Changeset 872 in tests


Ignore:
Timestamp:
07/03/2012 02:26:14 PM (12 years ago)
Author:
nacin
Message:

Add a constant to force known bugs and update the sample test config. see #49.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootstrap.php

    r839 r872  
    2424
    2525define( 'DIR_TESTDATA', dirname( __FILE__ ) . '/wp-testdata' );
     26
     27if ( ! defined( 'WP_TESTS_FORCE_KNOWN_BUGS' ) )
     28    define( 'WP_TESTS_FORCE_KNOWN_BUGS', false );
     29
     30// Cron tries to make an HTTP request to the blog, which always fails, because tests are run in CLI mode only
     31define( 'DISABLE_WP_CRON', true );
    2632
    2733$_SERVER['SERVER_PROTOCOL'] = 'HTTP/1.1';
  • trunk/wp-config-sample.php

    r841 r872  
    44define( 'ABSPATH', dirname( __FILE__ ) . '/wordpress/' );
    55
     6// Test with multisite enabled: (previously -m)
     7// define( 'WP_TESTS_MULTISITE', true );
     8
     9// Force known bugs: (previously -f)
     10// define( 'WP_TESTS_FORCE_KNOWN_BUGS', true );
     11
     12// Test with WordPress debug mode on (previously -d)
     13// define( 'WP_DEBUG', true );
     14
    615// ** MySQL settings ** //
    716
    8 // these will be used by the copy of wordpress being tested.
     17// This configuration file will be used by the copy of WordPress being tested.
    918// wordpress/wp-config.php will be ignored.
    1019
     
    3342define( 'WP_TESTS_TITLE', 'Test Blog' );
    3443
    35 define( 'WP_TESTS_MULTISITE', false );
    36  
    37 /* Cron tries to make an HTTP request to the blog, which always fails, because tests are run in CLI mode only */
    38 define( 'DISABLE_WP_CRON', true );
    39 
    4044$table_prefix  = 'wp_';
    4145
  • trunk/wp-testlib/testcase.php

    r870 r872  
    123123     */
    124124    function knownWPBug( $ticket_id ) {
    125         if ( ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
     125        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
    126126            $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
    127127        }
     
    132132     */
    133133    function knownUTBug( $ticket_id ) {
    134         if ( ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
     134        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
    135135            $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
    136136        }
     
    141141     */
    142142    function knownPluginBug( $ticket_id ) {
    143         if ( ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
     143        if ( ! WP_TESTS_FORCE_KNOWN_BUGS && ! TracTickets::isTracTicketClosed( 'http://plugins.trac.wordpress.org', $ticket_id ) ) {
    144144            $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
    145145        }
Note: See TracChangeset for help on using the changeset viewer.