Make WordPress Core

Changeset 761 in tests


Ignore:
Timestamp:
06/30/2012 05:33:20 PM (13 years ago)
Author:
maxcutler
Message:

Port Trac ticket checking helpers.

Fixes #43.

Location:
trunk/wp-testlib
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-testlib/testcase.php

    r760 r761  
    22
    33require_once 'factory.php';
     4require_once 'trac.php';
    45
    56class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
     
    110111    }
    111112
     113    /**
     114     * Skips the current test if there is open WordPress ticket with id $ticket_id
     115     */
     116    function knownWPBug( $ticket_id ) {
     117        if ( ! TrackTickets::isTracTicketClosed( 'http://core.trac.wordpress.org', $ticket_id ) ) {
     118            $this->markTestSkipped( sprintf( 'WordPress Ticket #%d is not fixed', $ticket_id ) );
     119        }
     120    }
     121
     122    /**
     123     * Skips the current test if there is open unit tests ticket with id $ticket_id
     124     */
     125    function knownUTBug( $ticket_id ) {
     126        if ( ! TrackTickets::isTracTicketClosed( 'http://unit-tests.trac.wordpress.org', $ticket_id ) ) {
     127            $this->markTestSkipped( sprintf( 'Unit Tests Ticket #%d is not fixed', $ticket_id ) );
     128        }
     129    }
     130
     131    /**
     132     * Skips the current test if there is open WordPress MU ticket with id $ticket_id
     133     */
     134    function knownMUBug( $ticket_id ) {
     135        if ( ! TrackTickets::isTracTicketClosed ( 'http://trac.mu.wordpress.org', $ticket_id ) ) {
     136            $this->markTestSkipped( sprintf( 'WordPress MU Ticket #%d is not fixed', $ticket_id ) );
     137        }
     138    }
     139
     140    /**
     141     * Skips the current test if there is open plugin ticket with id $ticket_id
     142     */
     143    function knownPluginBug( $ticket_id ) {
     144        if ( ! TrackTickets::isTracTicketClosed( 'http://dev.wp-plugins.org', $ticket_id ) ) {
     145            $this->markTestSkipped( sprintf( 'WordPress Plugin Ticket #%d is not fixed', $ticket_id ) );
     146        }
     147    }
     148
    112149}
Note: See TracChangeset for help on using the changeset viewer.