close
Skip to content

UnslashingFunctionsHelper::is_unslashing_function(): add tests#2715

Merged
GaryJones merged 2 commits into
WordPress:developfrom
rodrigoprimo:unslashing-functions-tests
Apr 23, 2026
Merged

UnslashingFunctionsHelper::is_unslashing_function(): add tests#2715
GaryJones merged 2 commits into
WordPress:developfrom
rodrigoprimo:unslashing-functions-tests

Conversation

@rodrigoprimo
Copy link
Copy Markdown
Contributor

@rodrigoprimo rodrigoprimo commented Apr 1, 2026

Description

In preparation for supporting PHPCS 4.0, this PR adds unit tests for the UnslashingFunctionsHelper::is_unslashing_function() method.

Suggested changelog entry

N/A

Related issues/external references

Related to: #2272

Copy link
Copy Markdown
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

LGTM.

I presume you have verified that there are no stray @covers tags for this function in pre-existing tests ?

@rodrigoprimo
Copy link
Copy Markdown
Contributor Author

rodrigoprimo commented Apr 2, 2026

Thanks for your review, @jrfnl!

I presume you have verified that there are no stray @covers tags for this function in pre-existing tests ?

Yes, I have, and there are no stray @covers tags for this function in the pre-existing tests.

Remove trailing `()` from the `@covers` tag and reorder `@see` to come
before `@return`.
@rodrigoprimo
Copy link
Copy Markdown
Contributor Author

I pushed a new commit to this PR addressing two minor issues that I noticed while working on a similar PR:

  • Trailing () in the method name in the @covers tag.
  • @see and @return tags in the wrong order.

@jrfnl
Copy link
Copy Markdown
Member

jrfnl commented Apr 2, 2026

@rodrigoprimo Yes, I noticed what you mention in the second bullet (also in #2713) and the way it is now is definitely preferred, but it was not a blocker. Good catch on the first. I missed that.

@jrfnl
Copy link
Copy Markdown
Member

jrfnl commented Apr 2, 2026

For whomever does the second review: please squash-merge!

@GaryJones GaryJones merged commit 273ae33 into WordPress:develop Apr 23, 2026
31 checks passed
@rodrigoprimo rodrigoprimo deleted the unslashing-functions-tests branch April 23, 2026 15:17
lesterchan added a commit to lesterchan/WordPress-Coding-Standards that referenced this pull request May 4, 2026
* upstream/develop: (223 commits)
  ContextHelper::is_in_type_test(): add tests (WordPress#2721)
  WPDBTrait::is_wpdb_method_call(): improve docblock description (WordPress#2719)
  ContextHelper::is_in_array_comparison(): add basic tests (WordPress#2726)
  ContextHelper::is_in_isset_or_empty(): add basic tests (WordPress#2725)
  WP/I18n: add tests for namespaced names
  WP/GetMetaSingle: add tests for namespaced names
  WP/DeprecatedParameterValues: add tests for namespaced names
  WP/DeprecatedParameterValues: move syntax error test to its own file
  WP/DeprecatedParameterValues: rename test case file
  WP/DeprecatedParameters: add tests for namespaced names
  FormattingFunctionsHelper::is_formatting_function(): add tests (WordPress#2713)
  UnslashingFunctionsHelper::is_unslashing_function(): add tests (WordPress#2715)
  GH Actions: Bump crate-ci/typos from 1.44.0 to 1.45.0 in the action-runners group (WordPress#2717)
  GH Actions: Bump codecov/codecov-action from 5.5.3 to 6.0.0
  GH Actions: Bump ramsey/composer-install from 3.1.1 to 4.0.0
  GH Actions: Bump the action-runners group with 2 updates
  Security/ValidatedSanitizedInput: add tests for namespaced names
  Apply suggestion from PR review
  WP/EnqueuedResourceParameters: add tests for namespaced names (WordPress#2675)
  GH Actions: Bump crate-ci/typos in the action-runners group
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants