-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Initial Unit Tests and Update Composer Dependencies #370
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tests run successfully on my end. I Induced some errors in the code which correctly lead to failures. The included tests are a great start, and more tests can be added as we continue development. Current functions covered in the tests include:
- calculate_total_paid_fiat
- fix_displaying_small_values
- get_crypto_payment_uri
- getSupportedCurrencies
- set_headers
- getActiveCurrencies
- testSetup
-- Different setups and errors
-- update_callback
-- examine_server_callback_urls
-- check_callback_urls_or_set_one
Github workflow works as desired.
Merging the Test Setup tests. We can open a new PR for more tests. |
This is phase 1 of testing for blockonomics woocommerce plugin.
It contains unittests for functions that are independent of WordPress or Woocommerce functionality, focusing on the
php/Blockonomics.php
file as it contains most of the plugin's functionality.Instructions for Running Tests:
composer.json
file is locatedcomposer install
to install the required dependencies. This step requires Composer to be installed on your machine.vendor/bin/phpunit tests/
Note: The
vendor
directory is included in the.gitignore
file and therefore are not committed to the repository. Thecomposer install
command will create thevendor
directory and ensure you have the correct versions of the dependencies for running the tests.