Tests: setExpectedDeprecated and setExpectedIncorrectUsage tests should make assertions.

Introduced in [31306].

See #36016.

git-svn-id: https://develop.svn.wordpress.org/trunk@36785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Boone Gorges
2016-02-29 21:55:41 +00:00
parent 603fee5749
commit 7505593ab8

View File

@@ -174,7 +174,7 @@ class Tests_TestHelpers extends WP_UnitTestCase {
*/
public function test_setExpectedDeprecated() {
$this->setExpectedDeprecated( 'Tests_TestHelpers::mock_deprecated' );
$this->mock_deprecated();
$this->assertTrue( $this->mock_deprecated() );
}
/**
@@ -182,7 +182,7 @@ class Tests_TestHelpers extends WP_UnitTestCase {
*/
public function test_setExpectedIncorrectUsage() {
$this->setExpectedIncorrectUsage( 'Tests_TestHelpers::mock_incorrect_usage' );
$this->mock_incorrect_usage();
$this->assertTrue( $this->mock_incorrect_usage() );
}
/**
@@ -197,9 +197,11 @@ class Tests_TestHelpers extends WP_UnitTestCase {
protected function mock_deprecated() {
_deprecated_function( __METHOD__, '2.5' );
return true;
}
protected function mock_incorrect_usage() {
_doing_it_wrong( __METHOD__, __( 'Incorrect usage test' ), '2.5' );
return true;
}
}