From 208a5dd57f71a4dcf6b99bfa62c4bcdc32cf18c5 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 23 Apr 2017 01:44:13 +0000 Subject: [PATCH] Build/Test Tools: Ensure that `WP_UnitTestCase::expectedDeprecated()` performs an assertion to avoid risky test notices. See #40538 git-svn-id: https://develop.svn.wordpress.org/trunk@40535 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/includes/testcase.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 ) ); } /**