Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more info to Contributing section, including tests #506

Merged
merged 2 commits into from
Jul 25, 2018

Conversation

joshcanhelp
Copy link
Contributor

No description provided.

@joshcanhelp joshcanhelp added this to the v3-Next milestone Jul 24, 2018
* `composer compat` to check for PHP version compatibility (currently 5.3), ignore files that you have not modified
* `composer phpcbf-path ./path/to/file/changed.php` to clean up whitespace
* `composer phpcs-path ./path/to/file/changed.php` to find other potential issues
* Run the [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) scripts listed below before creating your PR:
Copy link
Contributor

Choose a reason for hiding this comment

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

Run... before creating your PR.

sounds like it's time to apply this and this other blog posts.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I totally agree. It's on our SDK quality list. I'll assign some tasks for that on the next sprint 👍

README.md Outdated
* `composer compat` to check for PHP version compatibility (currently 5.3; required by CI)
* `composer phpcs-tests` to run code standard checks on test files (required by CI)
* `composer phpcs-path ./path/to/file/changed.php` to find other potential issues (not required by CI currently)
* `composer test` to run all tests (required by CI; see "Testing" section below)
Copy link
Contributor

Choose a reason for hiding this comment

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

you could link to this very same file's section just as normal MD. Use the title as anchor. see https://gist.github.com/asabaylus/3071099

README.md Outdated

WordPress testing is a bit different from typical testing in PHP, mainly because of the need for a working database. To run tests locally, you'll need to install the test suite, which is [covered here](https://make.wordpress.org/cli/handbook/plugin-unit-tests/#running-tests-locally). Run this install command:

```
Copy link
Contributor

Choose a reason for hiding this comment

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

all these snippets could use the bash or sh syntax highlighting

README.md Outdated

... to run a specific test.

Tests are run as isolated processes and, if database functions are used, should `use` the `SetUpTestDb` trait. See an example of this in the `TestWPAuth0Options` class.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this part is correctly written or even wrapped in the right syntax

should `use` the `SetUpTestDb` trait.

your call

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed for now. Poorly worded, you're right, and a bit of a beta testing "feature"

README.md Outdated

Tests are run as isolated processes and, if database functions are used, should `use` the `SetUpTestDb` trait. See an example of this in the `TestWPAuth0Options` class.

Please note that we are in the early stages of adding testing to this plugin so feedback on the current setup, including any problems you're having setting it up, are welcome and encouraged in the Issues tab.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can also link to "issues"

Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

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

🆗

@joshcanhelp joshcanhelp merged commit 6e9b520 into dev Jul 25, 2018
@joshcanhelp joshcanhelp deleted the add-contrib-docs-to-readme branch July 25, 2018 15:21
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants