WordPress.org

Make WordPress Core

Ticket #26116: assertNotWPError.diff

File assertNotWPError.diff, 593 bytes (added by georgestephanis, 7 years ago)
  • tests/phpunit/includes/testcase.php

     
    138138                $this->assertInstanceOf( 'WP_Error', $actual, $message );
    139139        }
    140140
     141        function assertNotWPError( $actual, $message = '' ) {
     142                $this->assertNotInstanceOf( 'WP_Error', $actual, $message );
     143        }
     144
    141145        function assertEqualFields( $object, $fields ) {
    142146                foreach( $fields as $field_name => $field_value ) {
    143147                        if ( $object->$field_name != $field_value ) {