From d6dd548c68343f0d4fbbf6ab7f9418c6c353e3e7 Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Fri, 17 Nov 2023 09:24:34 -0700 Subject: [PATCH] phpcbf --- tests/phpunit/tests/post/metaRevisions.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/phpunit/tests/post/metaRevisions.php b/tests/phpunit/tests/post/metaRevisions.php index b461b4c42b685..1716ebe9e41de 100644 --- a/tests/phpunit/tests/post/metaRevisions.php +++ b/tests/phpunit/tests/post/metaRevisions.php @@ -739,10 +739,13 @@ public function test_wp_save_post_revision_with_array_meta() { ); // Add the meta value to `_wp_post_revision_fields` which triggers it being compared for save consideration. - add_filter( '_wp_post_revision_fields', function( $fields ) { - $fields[ 'meta_revision_test' ] = 'Meta Revisions Test'; - return $fields; - } ); + add_filter( + '_wp_post_revision_fields', + function ( $fields ) { + $fields['meta_revision_test'] = 'Meta Revisions Test'; + return $fields; + } + ); // Set up a new post. $post_id = $this->factory->post->create( @@ -762,13 +765,13 @@ public function test_wp_save_post_revision_with_array_meta() { // Check that the meta is stored correctly. $stored_data = get_post_meta( $post_id, 'meta_revision_test', true ); - $this->assertEquals( array( 'test' ) , $stored_data ); + $this->assertEquals( array( 'test' ), $stored_data ); // Also verify that the latest revision has stored the meta. $revisions = wp_get_post_revisions( $post_id ); $last_revision = array_shift( $revisions ); $stored_data = get_post_meta( $last_revision->ID, 'meta_revision_test', true ); - $this->assertEquals( array( 'test' ) , $stored_data ); + $this->assertEquals( array( 'test' ), $stored_data ); // Update the meta. update_post_meta( $post_id, 'meta_revision_test', array( 'changed' ) ); @@ -799,6 +802,5 @@ public function test_wp_save_post_revision_with_array_meta() { // Verify the correct meta value is still returned. $this->assertEquals( array( 'changed' ), get_post_meta( $post_id, 'meta_revision_test', true ) ); - } }