WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/27/2015 10:26:16 PM (5 years ago)
Author:
johnbillion
Message:

Switch several assertions to assertNotWPError() so more context is provided when the assertion fails.

File:
1 edited

Legend:

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

    r34627 r34646  
    412412        $t = wp_insert_category( array( 'cat_name' => $term ) );
    413413        $this->assertTrue( is_numeric($t) );
    414         $this->assertFalse( is_wp_error($t) );
     414        $this->assertNotWPError( $t );
    415415        $this->assertTrue( $t > 0 );
    416416        $this->assertEquals( $initial_count + 1, wp_count_terms( 'category' ) );
Note: See TracChangeset for help on using the changeset viewer.