Make WordPress Core


Ignore:
Timestamp:
11/25/2013 10:49:51 PM (11 years ago)
Author:
wonderboymusic
Message:

When setting WP_TESTS_FORCE_KNOWN_BUGS to true, it is preferable that some forced tests are still skipped when they call classes or functions that do not exist, producing fatal errors.

Fixes #26248.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/iterators.php

    r25002 r26370  
    55 */
    66class Test_WP_Post_IDs_Iterator extends WP_UnitTestCase {
     7    function setUp() {
     8        if ( ! class_exists( 'WP_Post_IDs_Iterator' ) ) {
     9            $this->markTestSkipped( "WP_Post_IDs_Iterator class doesn't exist" );
     10        }
     11
     12        parent::setUp();
     13    }
     14
    715    function test_create() {
    816        new WP_Post_IDs_Iterator( array( 1, 2, 3 ) );
Note: See TracChangeset for help on using the changeset viewer.