Administration: Ensure that admin referer nonce is valid.

Fix for a testing regression.

Props desrosj.


git-svn-id: https://develop.svn.wordpress.org/trunk@46485 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock
2019-10-14 17:13:35 +00:00
parent 4e2d91d186
commit 778bf0c721

View File

@@ -166,7 +166,6 @@ class Tests_Auth extends WP_UnitTestCase {
}
public function test_check_admin_referer_with_default_action_as_string_not_doing_it_wrong() {
$this->setExpectedIncorrectUsage( 'check_admin_referer' );
// A valid nonce needs to be set so the check doesn't die()
$_REQUEST['_wpnonce'] = wp_create_nonce( '-1' );
$result = check_admin_referer( '-1' );