Skip to content

triplea-dev/triplea-woocommerce-plugin

Repository files navigation

TripleA Cryptocurrency Payment Gateway for WooCommerce

Contributing

Clone this repo, open PhpStorm, then run composer install to install the dependencies.

git clone https://github.com/triplea-dev/triplea-woocommerce-plugin.git
open -a PhpStorm ./;
composer install;

For integration and acceptance tests, a local webserver must be running with localhost/triplea-cryptocurrency-payment-gateway-for-woocommerce/ pointing at the root of the repo. MySQL must also be running locally – with two databases set up with:

# export PATH=${PATH}:/usr/local/mysql/bin

# Make .env available to bash
export $(grep -v '^#' .env.testing | xargs)

mysql -u $mysql_username -p$mysql_password -e "CREATE USER '"$TEST_DB_USER"'@'%' IDENTIFIED WITH mysql_native_password BY '"$TEST_DB_PASSWORD"';";
mysql -u $mysql_username -p$mysql_password -e "CREATE DATABASE "$TEST_SITE_DB_NAME"; USE "$TEST_SITE_DB_NAME"; GRANT ALL PRIVILEGES ON "$TEST_SITE_DB_NAME".* TO '"$TEST_DB_USER"'@'%';";
mysql -u $mysql_username -p$mysql_password -e "CREATE DATABASE "$TEST_DB_NAME"; USE "$TEST_DB_NAME"; GRANT ALL PRIVILEGES ON "$TEST_DB_NAME".* TO '"$TEST_DB_USER"'@'%';";

WordPress Coding Standards

See documentation on WordPress.org and GitHub.com.

Correct errors where possible and list the remaining with:

vendor/bin/phpcbf; vendor/bin/phpcs

Tests

Tests use the Codeception add-on WP-Browser and inlclude vanilla PHPUnit tests with WP_Mock.

Run tests with:

vendor/bin/codecept run unit;
vendor/bin/codecept run wpunit;
vendor/bin/codecept run integration;
vendor/bin/codecept run acceptance;
# Create dump after changing site.
export $(grep -v '^#' .env.testing | xargs);
mysqldump -u $TEST_SITE_DB_USER -p$TEST_SITE_DB_PASSWORD  $TEST_SITE_DB_NAME > tests/_data/dump.sql;

More Information

See github.com/BrianHenryIE/WordPress-Plugin-Boilerplate for initial setup rationale.

Acknowledgements

The contributors to WordPress Plugin Boilerplate and more.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •