diff --git a/tests/phpunit/includes/testcase.php b/tests/phpunit/includes/testcase.php index 612fa654e6..554de7e578 100644 --- a/tests/phpunit/includes/testcase.php +++ b/tests/phpunit/includes/testcase.php @@ -388,9 +388,7 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase { $errors[] = "Unexpected incorrect usage notice for $unexpected"; } - if ( ! empty( $errors ) ) { - $this->fail( implode( "\n", $errors ) ); - } + $this->assertEmpty( $errors, implode( "\n", $errors ) ); } /**