Skip to content

Fix context class test stability - #51

Merged
mukeshpanchal27 merged 2 commits into
trunkfrom
fix/context-test-stability
Jan 5, 2023
Merged

mukeshpanchal27 merged 2 commits into
trunkfrom
fix/context-test-stability

Conversation

@jjgrainger

Copy link
Copy Markdown
Contributor

Addresses comments in #47 (comment)

  • Makes use of the TESTS_PLUGIN_DIR constant when creating instances of the Plugin_Context and Check_Context classes in unit tests. TESTS_PLUGIN_DIR is equal to /var/www/html/wp-content/plugins/plugin-check/.
  • This is similar to how the classes are instantiated using the __FILE__ constant (seen in plugin-check.php file and creates the same expected full path, e.g /var/www/html/wp-content/plugins/plugin-check/
  • Tests are then updated to use the full path by prefixing expected strings with WP_PLUGIN_DIR . '\'

@jjgrainger jjgrainger added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall plugin infrastructure Milestone 1 labels Jan 4, 2023

@felixarntz felixarntz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@jjgrainger Looks good!

@mukeshpanchal27 mukeshpanchal27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @jjgrainger, Great work.

@mukeshpanchal27
mukeshpanchal27 merged commit 4d48e94 into trunk Jan 5, 2023
@mukeshpanchal27
mukeshpanchal27 deleted the fix/context-test-stability branch January 5, 2023 12:57
bordoni added a commit that referenced this pull request Sep 13, 2023
* Include a way to modify the PHP Binary Path
Move the PHP CLI path building to it's own class, enabling the PHPCS class to have proper separation of concerns.

In this PR I included the possibility for someone to modify the PHP Binary path that will be used to Run the PHP Code Sniffer.

* Fix a typo on the Class name docblock.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants