Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 1.76 KB

CONTRIBUTING.md

File metadata and controls

29 lines (18 loc) · 1.76 KB

Contributing

Contributions to WP Multi Network are much appreciated. You can help out in several ways:

Requirements & Recommendations

When contributing code to WP Multi Network, please keep the folowing in mind:

WP Multi Network provides easy-to-use workflows for both running integration tests (using PHPUnit) and checking coding and documentation standards (using PHPCodeSniffer). The plugin is integrated with Travis-CI in order to ensure those always pass.

PHPUnit and PHPCS Workflows

It is recommended to run integration tests and PHPCodeSniffer locally before committing, to check in advance that your changes do not cause unexpected issues. Here is how you can do that:

  • After cloning the plugin, you need to set up its dependencies by running composer install, and then composer config-phpcs to set up the WordPress Coding Standards. You only need to do this once.
  • In order to run the integration tests, you need to run vendor/bin/phpunit.
  • In order to check against the WordPress Coding Standards, you need to run vendor/bin/phpcs.

Writing Integration Tests

Integration tests should go into the tests/integration/tests directory. Each test class should extend the WPMN_UnitTestCase class, and file names should be prefixed with test-.