@@ -16,6 +16,18 @@ If you haven't yet set up your local development environment with the Kit Plugin
1616
1717If you haven't yet created a branch and made any code changes to the Plugin, refer to the [ Development Guide] ( DEVELOPMENT.md )
1818
19+ > ** Familiar with wp-browser, Codeception, PHP Coding Standards and PHPStan?**
20+ > Write your tests
21+ > Run tests using ` composer test [folder]/[cest] ` or ` composer test-integration [test] `
22+ > Run PHP Coding Standards using ` composer phpcs ` and ` composer phpcs-tests `
23+ > Run static analysis using ` composer phpstan `
24+ > [ Submit a Pull Request] ( https://github.com/ConvertKit/convertkit-wordpress/compare ) .
25+
26+ ##
27+
28+ - Write your tests
29+ - `composer test
30+
1931## Write (or modify) a test
2032
2133If your work creates new functionality, write a test.
@@ -377,6 +389,13 @@ To register your own helper function, add it to the `tests/Support/Helper/Wpunit
377389
378390## Run Tests
379391
392+ > ** Quick Commands**
393+ > ` composer test ` : Run all End to End tests
394+ > ` composer test general ` : Run all tests in the EndToEnd/general folder
395+ > ` composer test general/ActivateDeactivatePluginCest ` : Run all tests in the EndToEnd/general/ActivateDeactivatePluginCest file
396+ > ` composer test-integration ` : Run all Integration tests
397+ > ` composer test-integration APITest ` : Run the Integration/APITest tests
398+
380399Once you have written your code and test(s), run the tests to make sure there are no errors.
381400
382401If ChromeDriver isn't running, open a new Terminal window and enter the following command:
@@ -392,13 +411,15 @@ vendor/bin/codecept build
392411vendor/bin/codecept run EndToEnd
393412vendor/bin/codecept run Integration
394413```
395-
396414If a test fails, you can inspect the output and screenshot at ` tests/_output ` .
397415
398416Any errors should be corrected by making applicable code or test changes.
399417
400418## Run PHP CodeSniffer
401419
420+ > ** Quick Command**
421+ > ` composer phpcs ` : Run PHP Coding Standards on Plugin files
422+
402423[ PHP_CodeSniffer] ( https://github.com/squizlabs/PHP_CodeSniffer ) checks that all Plugin code meets the
403424[ WordPress Coding Standards] ( https://developer.wordpress.org/coding-standards/wordpress-coding-standards/ ) .
404425
@@ -428,6 +449,9 @@ Need to change the PHP or WordPress coding standard rules applied? Either:
428449
429450## Run PHPStan
430451
452+ > ** Quick Command**
453+ > ` composer phpstan ` : Run PHPStan static analysis on Plugin files
454+
431455[ PHPStan] ( https://phpstan.org ) performs static analysis on the Plugin's PHP code. This ensures:
432456
433457- DocBlocks declarations are valid and uniform
@@ -449,6 +473,9 @@ False positives [can be excluded by configuring](https://phpstan.org/user-guide/
449473
450474## Run PHP CodeSniffer for Tests
451475
476+ > ** Quick Command**
477+ > ` composer phpcs-tests ` : Run PHP Coding Standards on test files
478+
452479In the Plugin's directory, run the following command to run PHP_CodeSniffer, which will check the code meets Coding Standards
453480as defined in the ` phpcs.tests.xml ` configuration:
454481
0 commit comments