mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Tests: Consistently use the expectException() method instead of the older @expectedException annotation.
See https://thephp.cc/news/2016/02/questioning-phpunit-best-practices The method is available since PHPUnit 5.2, and WordPress currently supports PHPUnit 5.4 as the minimum version. Follow-up to [48993]. See #51344. git-svn-id: https://develop.svn.wordpress.org/trunk@48996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -179,10 +179,9 @@ EOT;
|
||||
$this->assertSame( array( 1 => '993003b95758e0ac2eba451a4c5877eb1bb7b92a' ), unpack( 'H40', _hash_hmac( 'sha1', 'simple', 'key', true ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException PHPUnit_Framework_Error_Deprecated
|
||||
*/
|
||||
function test_json_encode_decode() {
|
||||
$this->expectException( 'PHPUnit_Framework_Error_Deprecated' );
|
||||
|
||||
require_once ABSPATH . WPINC . '/class-json.php';
|
||||
$json = new Services_JSON();
|
||||
// Super basic test to verify Services_JSON is intact and working.
|
||||
|
||||
Reference in New Issue
Block a user