-
Notifications
You must be signed in to change notification settings - Fork 96
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
Conversation
* `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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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: | ||
|
||
``` |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗
No description provided.