From b087346757d9fbaa8c4c6d307798f50accc3c415 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 5 Sep 2022 14:04:12 +0000 Subject: [PATCH] Tests: Set the current user to Editor in `test_utf8mb3_post_saves_with_emoji()`. This avoids a "Sorry, you are not allowed to edit this post" error further in the test. The test is currently skipped on GitHub Actions, as only runs on older MySQL versions specifically with the `utf8` character set. The user was previously set for all tests in the file in the `set_up()` method, however that is no longer the case, as it was not required for the majority of the tests. It is, however, necessary for the `edit_post()` call in this particular test. Follow-up to [30346], [53785]. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54067 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpunit/tests/post.php b/tests/phpunit/tests/post.php index 93af2b7281..62fbd7bc81 100644 --- a/tests/phpunit/tests/post.php +++ b/tests/phpunit/tests/post.php @@ -302,6 +302,8 @@ class Tests_Post extends WP_UnitTestCase { 'post_excerpt' => 'foo😐bat', ); + wp_set_current_user( self::$editor_id ); + edit_post( $data ); $post = get_post( $post_id );