Tests: Give the tests for adding empty post meta values more consistent names.

One of these was previously renamed to mention `update_metadata_by_mid()`.

While `update_metadata_by_mid()` is indeed called in `wp_ajax_add_meta()` to update an existing meta value, the functionality change that the test intended to verify was in the latter function.

Follow-up to [44153], [53561].

See #55652.

git-svn-id: https://develop.svn.wordpress.org/trunk@53572 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2022-06-24 14:41:11 +00:00
parent c6ada508e6
commit 4621347494
2 changed files with 7 additions and 5 deletions

View File

@@ -827,8 +827,10 @@ class Tests_Admin_IncludesPost extends WP_UnitTestCase {
/**
* @ticket 43559
*
* @covers ::add_meta
*/
public function test_post_add_meta_empty_is_allowed() {
public function test_add_meta_allows_empty_values() {
$p = self::factory()->post->create();
$_POST = array(

View File

@@ -14,10 +14,10 @@ class Tests_Ajax_AddMeta extends WP_Ajax_UnitTestCase {
/**
* @ticket 43559
*
* @covers ::add_post_meta
* @covers ::wp_ajax_add_meta
* @covers ::add_post_meta
*/
public function test_post_add_meta_empty_is_allowed_ajax() {
public function test_wp_ajax_add_meta_allows_empty_values_on_adding() {
$post = self::factory()->post->create();
// Become an administrator.
@@ -43,10 +43,10 @@ class Tests_Ajax_AddMeta extends WP_Ajax_UnitTestCase {
/**
* @ticket 43559
*
* @covers ::update_metadata_by_mid
* @covers ::wp_ajax_add_meta
* @covers ::update_metadata_by_mid
*/
public function test_update_metadata_by_mid_allows_empty_values_ajax() {
public function test_wp_ajax_add_meta_allows_empty_values_on_updating() {
$post = self::factory()->post->create();
$meta_id = add_post_meta( $post, 'testkey', 'hello' );