WordPress.org

Make WordPress Core

Changeset 660 in tests


Ignore:
Timestamp:
04/09/12 21:22:50 (3 years ago)
Author:
nacin
Message:

Skip all of WPTestGalleryPost as it tests against a broken and unused dataset. see #30.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_post_output.php

    r659 r660  
    132132class WPTestGalleryPost extends _WPDataset1 { 
    133133    function setUp() { 
     134        $this->knownUTBug(30); 
    134135        parent::setUp(); 
    135136        global $wp_rewrite; 
  • wp-testlib/base.php

    r625 r660  
    364364        global $wpdb; 
    365365        foreach ($lines as $line) { 
    366             if ( !trim($line) or preg_match('/^-- /', $line) ) 
     366            $line = trim( $line ); 
     367            if ( empty( $line ) || 0 === strpos( $line, '--' ) || 0 === strpos( $line, '/*' ) ) 
    367368                continue; 
    368369            $wpdb->query($line); 
     
    433434     */ 
    434435    function knownWPBug($ticket_id) { 
    435         if (!TEST_FORCE_KNOWN_BUGS && (TEST_SKIP_KNOWN_BUGS || !$this->isTracTicketClosed('http://trac.wordpress.org', $ticket_id))) { 
     436        if (!TEST_FORCE_KNOWN_BUGS && (TEST_SKIP_KNOWN_BUGS || !$this->isTracTicketClosed('http://core.trac.wordpress.org', $ticket_id))) { 
    436437            $this->markTestSkipped( sprintf('WordPress Ticket #%d is not fixed', $ticket_id) ); 
     438        } 
     439    } 
     440 
     441    /** 
     442     * Skips the current test if there is open WordPress ticket with id $ticket_id 
     443     */ 
     444    function knownUTBug($ticket_id) { 
     445        if (!TEST_FORCE_KNOWN_BUGS && (TEST_SKIP_KNOWN_BUGS || !$this->isTracTicketClosed('http://unit-tests.trac.wordpress.org', $ticket_id))) { 
     446            $this->markTestSkipped( sprintf('Unit Tests Ticket #%d is not fixed', $ticket_id) ); 
    437447        } 
    438448    } 
Note: See TracChangeset for help on using the changeset viewer.