mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
REST API: Some documentation and test improvements for update_menu_item_cache():
* Make the function description more specific, for consistency with other similar functions. * Add a `@since` note for the `$update_menu_item_cache` parameter of `WP_Query::parse_query()`. * Add missing `@covers` tags for the unit tests. Follow-up to [53504]. See #55620. git-svn-id: https://develop.svn.wordpress.org/trunk@53508 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -204,8 +204,9 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
|
||||
|
||||
/**
|
||||
* @ticket 55620
|
||||
* @covers update_menu_item_cache
|
||||
*/
|
||||
public function test_update_menu_item_cache_primed_post() {
|
||||
public function test_update_menu_item_cache_primed_posts() {
|
||||
$post_id = self::factory()->post->create();
|
||||
wp_update_nav_menu_item(
|
||||
$this->menu_id,
|
||||
@@ -229,11 +230,12 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
|
||||
|
||||
$args = $action->get_args();
|
||||
$last = end( $args );
|
||||
$this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches was not executed.' );
|
||||
$this->assertEqualSets( array( $post_id ), $last[1], '_prime_post_caches() was not executed.' );
|
||||
}
|
||||
|
||||
/**
|
||||
* @ticket 55620
|
||||
* @covers update_menu_item_cache
|
||||
*/
|
||||
public function test_update_menu_item_cache_primed_terms() {
|
||||
register_taxonomy( 'wptests_tax', 'post', array( 'hierarchical' => true ) );
|
||||
@@ -260,7 +262,7 @@ class Tests_Post_Nav_Menu extends WP_UnitTestCase {
|
||||
|
||||
$args = $action->get_args();
|
||||
$last = end( $args );
|
||||
$this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches was not executed.' );
|
||||
$this->assertEqualSets( array( $term_id ), $last[1], '_prime_term_caches() was not executed.' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user