mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: Fix typo in a comment in wp_trim_excerpt().
Includes removing redundant `@covers` tags. There is already an existing annotation for the whole test class, following the [https://docs.phpunit.de/en/9.6/annotations.html#covers PHPUnit recommendation]: > This annotation can be added to the docblock of the test class or the individual test methods. The recommended way is to add the annotation to the docblock of the test class, not to the docblock of the test methods. Follow-up to [56560]. See #58682. git-svn-id: https://develop.svn.wordpress.org/trunk@56561 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3984,7 +3984,7 @@ function wp_trim_excerpt( $text = '', $post = null ) {
|
||||
|
||||
/*
|
||||
* Temporarily unhook do_blocks() since excerpt_remove_blocks( $text )
|
||||
* handels block rendering needed for excerpt.
|
||||
* handles block rendering needed for excerpt.
|
||||
*/
|
||||
$filter_block_removed = remove_filter( 'the_content', 'do_blocks', 9 );
|
||||
|
||||
|
||||
@@ -153,8 +153,6 @@ class Tests_Formatting_wpTrimExcerpt extends WP_UnitTestCase {
|
||||
* Tests that `wp_trim_excerpt()` does process valid blocks.
|
||||
*
|
||||
* @ticket 58682
|
||||
*
|
||||
* @covers ::wp_trim_excerpt
|
||||
*/
|
||||
public function test_wp_trim_excerpt_check_if_block_renders() {
|
||||
$post = self::factory()->post->create(
|
||||
@@ -172,8 +170,6 @@ class Tests_Formatting_wpTrimExcerpt extends WP_UnitTestCase {
|
||||
* Tests that `wp_trim_excerpt()` unhooks `do_blocks()` from 'the_content' filter.
|
||||
*
|
||||
* @ticket 58682
|
||||
*
|
||||
* @covers ::wp_trim_excerpt
|
||||
*/
|
||||
public function test_wp_trim_excerpt_unhooks_do_blocks() {
|
||||
$post = self::factory()->post->create();
|
||||
@@ -200,8 +196,6 @@ class Tests_Formatting_wpTrimExcerpt extends WP_UnitTestCase {
|
||||
* Tests that `wp_trim_excerpt()` doesn't permanently unhook `do_blocks()` from 'the_content' filter.
|
||||
*
|
||||
* @ticket 58682
|
||||
*
|
||||
* @covers ::wp_trim_excerpt
|
||||
*/
|
||||
public function test_wp_trim_excerpt_should_not_permanently_unhook_do_blocks() {
|
||||
$post = self::factory()->post->create();
|
||||
@@ -215,8 +209,6 @@ class Tests_Formatting_wpTrimExcerpt extends WP_UnitTestCase {
|
||||
* Tests that `wp_trim_excerpt()` doesn't restore `do_blocks()` if it was previously unhooked.
|
||||
*
|
||||
* @ticket 58682
|
||||
*
|
||||
* @covers ::wp_trim_excerpt
|
||||
*/
|
||||
public function test_wp_trim_excerpt_does_not_restore_do_blocks_if_previously_unhooked() {
|
||||
$post = self::factory()->post->create();
|
||||
|
||||
Reference in New Issue
Block a user