From c9ce017438e0fca84e5b7b17c58742325421bdd7 Mon Sep 17 00:00:00 2001 From: Grzegorz Rola <grola@seostudio.pl> Date: Mon, 11 Mar 2024 12:51:06 +0100 Subject: [PATCH] bugfix(ajax): permission check --- tests/codeception/tests/integration/AjaxHandlerTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/codeception/tests/integration/AjaxHandlerTest.php b/tests/codeception/tests/integration/AjaxHandlerTest.php index c0f40f9..9967080 100644 --- a/tests/codeception/tests/integration/AjaxHandlerTest.php +++ b/tests/codeception/tests/integration/AjaxHandlerTest.php @@ -91,6 +91,7 @@ class AjaxHandlerTest extends WPTestCase { } public function testShoulfNotProcessAjaxNoticeDismissWhenInvalidNonce() { + defince( 'DOING_AJAX', true ); $_POST[ AjaxHandler::POST_FIELD_NOTICE_NAME ] = self::NOTICE_NAME; $_POST[ AjaxHandler::POST_FIELD_SECURITY ] = wp_create_nonce(); -- GitLab