woocommerce / woocommerce-order-source-attribution

WooCommerce Order Source Attribution helps merchants understand which marketing activities, channels or campaigns are leading to orders in their stores.
https://github.com/woocommerce/woocommerce-order-source-attribution
5 stars 0 forks source link

Add PHP Unit. #19

Closed rawdreeg closed 1 year ago

rawdreeg commented 1 year ago

Changes proposed in this Pull Request:

Add PHP Unit as a dependency and set up bootstrap.

Closes #18.

Checks:

Detailed test instructions:

The PHPUnit implementation is based on how GLA and Pinterest for WooCommerce tests are setup.

From the plugin directory, checkout add/18-phpunit and then run:

  1. composer install
  2. bin/install-unit-tests.sh <db-name> <db-user> <db-pass> [db-host] latest latest
  3. vendor/bin/phpunit
rawdreeg commented 1 year ago

Thanks, @JPry. I am going to merge this and make a new PR suggesting some tests for Automattic\WooCommerce\OrderSourceAttribution\Integration\WPConsentAPI