From 51d2b2924a7ee2e2ddcb72aa1f44047814b7d8e9 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Tue, 12 Apr 2022 15:59:45 +0000 Subject: [PATCH] Administration: Add unit test for term supplementary notice. Adds a new test assertion to handle the supplemental data array passed in `ajax-response.js`. Follow up to [53123]. Props SergeyBiryukov, peterwilsoncc. Fixes #55078. git-svn-id: https://develop.svn.wordpress.org/trunk@53159 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/ajax/AddTag.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/phpunit/tests/ajax/AddTag.php b/tests/phpunit/tests/ajax/AddTag.php index 48b5fc5f24..0095dcf261 100755 --- a/tests/phpunit/tests/ajax/AddTag.php +++ b/tests/phpunit/tests/ajax/AddTag.php @@ -38,7 +38,10 @@ class Tests_Ajax_AddTag extends WP_Ajax_UnitTestCase { unset( $e ); } + // The response message is in the `data` property in WP 5.9. $this->assertSame( $expected, (string) $this->get_xml_response_taxonomy()->response_data ); + // The response message is in the `supplemental->notice` property in WP 6.0+. + $this->assertSame( $expected, (string) $this->get_xml_response_taxonomy()->supplemental->notice ); } /**