Skip to content

Added test post navigation link attribute filters#3808

Closed
creative-andrew wants to merge 7 commits intoWordPress:trunkfrom
creative-andrew:feature/posts-navigation-link-attributes
Closed

Added test post navigation link attribute filters#3808
creative-andrew wants to merge 7 commits intoWordPress:trunkfrom
creative-andrew:feature/posts-navigation-link-attributes

Conversation

@creative-andrew
Copy link
Copy Markdown

@creative-andrew creative-andrew commented Dec 29, 2022

Trac ticket: https://core.trac.wordpress.org/ticket/55751

This PR adds tests for next_posts_link_attributes & previous_posts_link_attributes filters and invalidates the patch #2725 submitted in the above-mentioned ticket as the current functionality is correct.

Copy link
Copy Markdown
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @creative-andrew Left one more review to use function instead of the variable.

Copy link
Copy Markdown
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @creative-andrew 👋 I've left some thoughts to help prep this for commit consideration. Thanks! 🙂

audrasjb and others added 5 commits February 22, 2023 23:34
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
@audrasjb
Copy link
Copy Markdown
Contributor

@costdev change proposals committed :)

@audrasjb
Copy link
Copy Markdown
Contributor

@audrasjb audrasjb closed this Feb 27, 2023
@audrasjb
Copy link
Copy Markdown
Contributor

Reopening

@audrasjb audrasjb reopened this Feb 28, 2023
@creative-andrew creative-andrew requested review from costdev and removed request for mukeshpanchal27 February 28, 2023 17:47
Copy link
Copy Markdown
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @creative-andrew, The changes look good to me.

@SergeyBiryukov
Copy link
Copy Markdown
Member

Thanks for the PR! Merged in r55442 with a few minor edits:

  • We don't usually have a separate test class just for filters in a function, so this can be a general test class for the function.
  • The @covers tags should mention the function name, not the filter name.
  • Instead of a closure, MockAction::get_call_count() can be used as a quick way to check that the filter is applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants