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
This commit is contained in:
Joe Dolson
2022-04-12 15:59:45 +00:00
parent 676f418c30
commit 51d2b2924a

View File

@@ -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 );
}
/**