diff --git a/.gitignore b/.gitignore index 4ff063de8..80989fd78 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ wp-config.php # IDE files .vscode/* + +# Code coverage report +/reports diff --git a/README.md b/README.md index 4d8920a79..d060b0ac5 100644 --- a/README.md +++ b/README.md @@ -9,15 +9,24 @@ This is the development repository for the Facebook for WooCommerce plugin. - [User documentation](https://woocommerce.com/document/facebook-for-woocommerce/) ## Support -The best place to get support is the [WordPress.org Facebook for WooCommerce forum](https://wordpress.org/support/plugin/facebook-for-woocommerce/). -If you have a WooCommerce.com account, you can [search for help or submit a help request on WooCommerce.com](https://woocommerce.com/my-account/contact-support/). +The best place to get support is +the [WordPress.org Facebook for WooCommerce forum](https://wordpress.org/support/plugin/facebook-for-woocommerce/). + +If you have a WooCommerce.com account, you +can [search for help or submit a help request on WooCommerce.com](https://woocommerce.com/my-account/contact-support/). ### Logging -The plugin offers logging that can help debug various problems. You can enable debug mode in the main plugin settings panel under the `Enable debug mode` section. -By default plugin omits headers in the requests to make the logs more readable. If debugging with headers is necessary you can enable the headers in the logs by setting `wc_facebook_request_headers_in_debug_log` option to true. + +The plugin offers logging that can help debug various problems. You can enable debug mode in the main plugin settings +panel under the `Enable debug mode` section. +By default plugin omits headers in the requests to make the logs more readable. If debugging with headers is necessary +you can enable the headers in the logs by setting `wc_facebook_request_headers_in_debug_log` option to true. + ## Development + ### Developing + - Clone this repository into the `wp-content/plugins/` folder your WooCommerce development environment. - Install dependencies: - `npm install` @@ -29,14 +38,18 @@ By default plugin omits headers in the requests to make the logs more readable. - Testing: - `./bin/install-wp-tests.sh [db-host]` to set up testing environment - `npm run test:php` to run PHP unit tests on all PHP files + - `./vendor/bin/phpunit --coverage-html=reports/coverage` to run PHP unit tests with coverage #### Production build - `npm run build` : Builds a production version. ### Releasing -Refer to the [wiki for details of how to build and release the plugin](https://github.com/woocommerce/facebook-for-woocommerce/wiki/Build-&-Release). + +Refer to +the [wiki for details of how to build and release the plugin](https://github.com/woocommerce/facebook-for-woocommerce/wiki/Build-&-Release). ### PHPCS Linting and PHP 8.1+ -We currently do not support PHPCS on PHP 8.1+ versions. Please run PHPCS checks on PHP 8.0 or lower versions. Refer [#2624 PR](https://github.com/woocommerce/facebook-for-woocommerce/pull/2624/) for additional context. +We currently do not support PHPCS on PHP 8.1+ versions. Please run PHPCS checks on PHP 8.0 or lower versions. +Refer [#2624 PR](https://github.com/woocommerce/facebook-for-woocommerce/pull/2624/) for additional context. diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9461ea39d..dbb87fc3b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,13 @@ @@ -17,4 +17,9 @@ ./tests/integration + + + includes + +