Build/Test Tools: More tweaks to the deprecated calls assertion. This needs to be triggered when there are unexpected deprecated calls or wrongdoings too.
See #40538 git-svn-id: https://develop.svn.wordpress.org/trunk@40542 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
21ce4e90d3
commit
e3a9d87083
@ -388,8 +388,11 @@ class WP_UnitTestCase extends PHPUnit_Framework_TestCase {
|
||||
$errors[] = "Unexpected incorrect usage notice for $unexpected";
|
||||
}
|
||||
|
||||
// Perform an assertion, but only if there are expected deprecated calls or expected wrongdoings
|
||||
if ( ! empty( $this->expected_deprecated ) || ! empty( $this->expected_doing_it_wrong ) ) {
|
||||
// Perform an assertion, but only if there are expected or unexpected deprecated calls or wrongdoings
|
||||
if ( ! empty( $this->expected_deprecated ) ||
|
||||
! empty( $this->expected_doing_it_wrong ) ||
|
||||
! empty( $this->caught_deprecated ) ||
|
||||
! empty( $this->caught_doing_it_wrong ) ) {
|
||||
$this->assertEmpty( $errors, implode( "\n", $errors ) );
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user