Commit Graph

216 Commits

Author SHA1 Message Date
Jeff Stieler 3d232cb736 Use proper tests checkout for WP_VERSION=latest
See https://github.com/wp-cli/wp-cli/issues/2129 for more info.
2015-10-20 09:40:00 -06:00
Akeda Bagus f3dfdd20da Assert log line format and its log message instead of log line equality.
Timestamp is not reliable to assert during the test.
2015-09-12 21:18:41 +07:00
Claudio Sanches cc12253339 Make travis use php lint in all files 2015-08-20 15:08:02 -03:00
Shiva Poudel 376320f4eb Corrected docblock for scrutinizer ocular 2015-08-19 20:34:05 +05:45
Ramon van Belzen ff2feed3f3 Update travis.sh 2015-08-19 09:47:50 +02:00
Claudio Sanches c324c66acc Fixed tests for #8835 2015-08-14 15:39:20 -03:00
George Stephanis c938fa24da More missing esc_attr calls, :( 2015-08-05 15:17:52 -04:00
Claudio Sanches 0361a10e26 Removed instances of WC_Order in favor to wc_get_order(), closes #8689 2015-07-30 15:07:34 -03:00
Claudio Sanches 7d4a531703 Fixed tests for variable products 2015-07-28 13:07:48 -03:00
Shiva Poudel f543430476 Unit Test class instance of Integrations 2015-07-20 16:55:58 +05:45
Claudio Sanches 409dd81ab9 Fixed unit tests for WC_Cart::get_remove_url() 2015-07-14 12:02:32 -03:00
Claudio Sanches ac8f18a721 Fixed unit tests
@mikejolley
2015-07-08 23:40:29 -03:00
Mike Jolley ac6cc96d35 Customer needs to be defined 2015-07-07 12:51:05 +01:00
Mike Jolley 6773b74770 Unit test - customer_address is geolocated 2015-07-07 12:36:06 +01:00
Claudio Sanches c13409150f Fixed tests for get_woocommerce_currencies()
@mikejolley
2015-06-29 15:13:42 -03:00
Justin Shreve 0a9d00bab6 Update the version number check for test_get_woocommerce_api_url 2015-06-19 13:42:10 +00:00
Mike Jolley 1f79a116e9 Fix create_simple_flat_rate helper 2015-06-16 14:48:06 +01:00
Justin Shreve 651b65f28e Add a unit test for get_variation_id so we know we are getting back the IDs that we want 2015-06-09 13:02:02 +00:00
Claudio Sanches d5c5d5e394 Fixed unit tests for wc_get_price_thousand_separator() and wc_get_price_decimal_separator() 2015-06-01 11:03:19 -03:00
Claudio Sanches eff9b5ec18 Fixed test for wc_format_list_of_items 2015-05-28 10:28:49 -03:00
Claudio Sanches 9826273f8f Merge pull request #7910 from SiR-DanieL/unit-tests
More unit tests
2015-05-28 10:27:10 -03:00
Mike Jolley 5ef335b169 Merge pull request #8215 from JeroenSormani/order-tests
Order tests
2015-05-28 12:44:17 +01:00
Claudio Sanches ef8c3dd267 Fixed testes for wc_price() 2015-05-27 13:26:26 -03:00
JeroenSormani 7dde4f58c7 WC_Helper_Order class convert tab alignment to spaces 2015-05-23 10:57:06 +02:00
JeroenSormani 280904f9b4 WC_Helper_Order order total correct 2015-05-23 10:54:14 +02:00
JeroenSormani 59a4ca5fa6 Add WC_Helper_Order class 2015-05-23 10:52:06 +02:00
JeroenSormani b95b22d144 Add wc_get_order() tests + Order helper class 2015-05-23 10:48:07 +02:00
Claudio Sanches 8a9ab7ffea Fixed get_woocommerce_api_url() for the new API versions numbers and
fixed the tests

@mikejolley
2015-05-05 09:01:34 -03:00
Mike Jolley 5786f89b3c Update unit test for c37c1bd9fa 2015-05-01 15:28:17 +01:00
Nicola Mustone f41e101b3f test wc_processing_order_count, wc_orders_count 2015-04-14 16:47:04 +02:00
Nicola Mustone 839b5a4aa5 Tests for wc_format_list_of_items, wc_cart_totals_subtotal_html, wc_cart_totals_coupon_label 2015-04-14 16:37:10 +02:00
Nicola Mustone f5d5bf0a00 typo 2015-04-14 15:40:47 +02:00
Nicola Mustone d4508bed9c adding data provider notes in the README 2015-04-14 15:40:20 +02:00
Nicola Mustone 0347a4005f added data providers 2015-04-14 15:34:35 +02:00
Mike Jolley 2ddd07b252 FIx fixed product discount 2015-04-10 10:55:40 +01:00
Nicola Mustone d4ff494a3f test wc_get_price_decimals, wc_get_price_decimal_separator, wc_get_price_thousand_separator 2015-04-09 17:35:35 +02:00
Nicola Mustone 58f86eddf9 test wc_sanitize_tooltip 2015-04-09 17:24:58 +02:00
Nicola Mustone bf1407a60d added filters to test_wc_placeholder_img 2015-04-09 17:14:59 +02:00
Nicola Mustone ce41820fbf test wc_placeholder_img 2015-04-09 17:10:00 +02:00
Nicola Mustone 68e36f625a test wc_delete_product_transients 2015-04-09 17:00:07 +02:00
Nicola Mustone b8850724d3 tests now check for empty arrays first 2015-04-09 16:56:45 +02:00
Nicola Mustone 5815b5f155 test wc_get_featured_product_ids 2015-04-09 16:50:28 +02:00
Nicola Mustone 51c4019c76 test wc_get_product_ids_on_sale 2015-04-09 16:43:18 +02:00
Nicola Mustone 50abebac89 tests WC_Validation 2015-04-08 17:56:02 +02:00
Nicola Mustone bc2bbf07c5 test wc_get_log_file_path 2015-04-08 17:55:54 +02:00
Nicola Mustone 8c52135c26 test wc_get_log_file_path 2015-04-08 17:55:40 +02:00
Nicola Mustone 1f8e512b01 tests WC_Logger 2015-04-08 17:55:19 +02:00
Barry Kooij 017c3b341e Merge pull request #7655 from SiR-DanieL/unit
Begin tests WC_Validation
2015-04-08 13:15:18 +02:00
Mike Jolley 37507ec451 Merge pull request #7654 from SiR-DanieL/patch-4
Fix documentation for unit tests
2015-04-08 12:12:53 +01:00
Claudio Sanches b697a714a7 Fixed the testes for wc_get_weight() 2015-03-11 14:23:47 -03:00
Nicola Mustone c72e44401a begin tests WC_Validation 2015-03-06 18:27:18 +01:00
Nicola Mustone c15091d294 no longer using formatting-functions.php 2015-03-06 17:43:02 +01:00
Barry Kooij f699f5102c Unit Tests: Fix Product\Functions tests 2015-03-06 16:59:19 +01:00
Barry Kooij 75e9f93891 Unit Test: Product_Simple fixes.
Related #7624
2015-03-06 16:55:11 +01:00
Barry Kooij d6b970a61d Namespace the Unit Tests 2015-03-06 16:32:40 +01:00
Nicola Mustone d20047430b more tests 2015-03-05 17:32:53 +01:00
Nicola Mustone eefdfac91d delete product if not empty 2015-03-05 17:32:45 +01:00
Nicola Mustone 1b941941a2 wrong tearDown 2015-03-04 18:25:29 +01:00
Nicola Mustone 36ece7a7f8 test WC_Product_Simple 2015-03-04 18:23:25 +01:00
Nicola Mustone 99c35e83eb added more product functions tests 2015-03-04 16:48:11 +01:00
Nicola Mustone 3615e75de1 helper methods to get and delete a dummy product 2015-03-04 09:33:05 +01:00
Nicola Mustone 72c2d37478 restore _manage_stock properly 2015-03-04 09:25:15 +01:00
Nicola Mustone c916037f10 test wc-product-functions.php 2015-03-04 09:00:33 +01:00
Nicola Mustone 42107fa37b fix option name 2015-03-03 12:47:13 +01:00
Nicola Mustone a18d2bd158 localize status in test_wc_get_order_status_name 2015-03-03 12:42:58 +01:00
Nicola Mustone e602082056 test order-functions 2015-03-03 12:38:05 +01:00
Nicola Mustone 9877d49207 test_wc_trim_string 2015-03-03 12:37:57 +01:00
Nicola Mustone f1f8759c41 test_wc_is_valid_url 2015-03-03 12:37:49 +01:00
Nicola Mustone 060bce3f00 delete created product 2015-03-02 17:11:42 +01:00
Nicola Mustone 6ac167ac36 wc-cart-functions - unit tests begin 2015-03-02 17:06:03 +01:00
Mike Jolley 3623d82881 Fix compound tax unit test #7525 2015-02-23 11:03:06 +00:00
Paul Kilmurray cb12623fa7 Compound tax calculation test
There is either an error in the calculation for compound taxes, or
there is something wrong with my understanding of how compound taxes
should work - I’m definitely not discounting the later.

Given a price of $9.99 exclusive of tax, applying a 10% tax will give
9.99 + 0.999 = 10.989. Then applying a compound tax of 2% should give
10.989 + 0.2198 = 11.2088.

The result of the WC_Tax::calc_tax on the 2% compound tax is 0.1998
which seems to be in error.

Likewise for prices exclusive of tax.

Note: rounding to 4 decimal places on all calculations
2015-02-23 14:40:10 +08:00
shivapoudel db012b03df Cleanup WC_Unit_Test_Case 2015-02-04 22:07:52 +05:45
shivapoudel b207391041 Unit Test docblock comment for setUp 2015-02-04 22:03:01 +05:45
shivapoudel 23a94dea1d Tweaks roles typo 2015-02-03 22:07:58 +05:45
Jeroen Sormani cd1e706327 Merge remote-tracking branch 'upstream/master' 2015-01-11 10:30:03 +00:00
Claudio Sanches c4812461da [Tests] Fixed the WC_Tests_Tax::test_get_shipping_tax_rates() 2015-01-05 14:59:16 -02:00
Claudio Sanches b3cf6435b9 Merge pull request #6927 from purcebr/master
Unit Tests for WC_Customer class
2015-01-05 14:50:54 -02:00
Mike Jolley 6dced09940 Fix test_get_rates unit test 2015-01-05 16:40:31 +00:00
Mike Jolley 7d5e13cea6 Update wc_get_base_location() unit test 2015-01-05 10:26:35 +00:00
Mike Jolley 8df8c9b482 Make 'public', and rewrite, optional for attributes
#6852
2014-12-22 14:16:15 +00:00
Jeroen Sormani a1ee0d7d87 Revert back to original wp_test_dir 2014-12-22 13:34:43 +01:00
Jeroen Sormani 4a3bf7029c Revert back to original wp_test_dir 2014-12-22 13:34:09 +01:00
JeroenSormani d523bd4c82 Replace many asserts with @dataProvider 2014-12-21 21:57:30 +01:00
JeroenSormani 9fad3f2171 Fix to make it work on local machines 2014-12-21 21:47:59 +01:00
Claudio Sanches 82e15ab231 [Tests] Updated the test for wc_get_core_supported_themes() 2014-12-12 10:29:22 -02:00
Bryan Purcell 54d50d8307 Clearing out the cart, and the mock product 2014-12-11 00:00:49 -06:00
Bryan Purcell bc9821253f Refactoring and fixing bugs in WC_Customer Unit Tests 2014-12-10 23:54:06 -06:00
Bryan Purcell 0213fcce85 Refactoring, resetting settings after test.
Testing multiple combinations of store default shipping methods, moving
helper methods to a unit test Helper Class.
2014-12-10 17:02:43 -06:00
Bryan Purcell 37fc5c2bda Merge branch 'master' of github.com:woothemes/woocommerce 2014-12-10 17:00:28 -06:00
Claudio Sanches 130ddb2b56 [Tests] Fixed the tests for wc_timezone_string() 2014-12-10 16:09:01 -02:00
Claudio Sanches 51c5c65c9a [Tests] removed deprecated tax method 2014-12-10 15:47:35 -02:00
Bryan Purcell 18fe337fac Refactoring the WC_Customer Unit Tests 2014-12-09 19:50:31 -06:00
Bryan Purcell 4af6f1765d Unit Tests for business logic in the WC_Customer class 2014-12-09 16:11:31 -06:00
Claudio Sanches 6841ca81c9 Fixed the coupons tests and improved the tax tests 2014-12-04 11:44:55 -02:00
Mike Jolley eba8206540 Merge branch 'tax-coupon-handling' Closes #6830
Conflicts:
	assets/js/admin/meta-boxes-order.min.js
	includes/api/class-wc-api-coupons.php
	includes/class-wc-cart.php
	templates/checkout/review-order.php
2014-12-03 12:33:15 +00:00
Mike Jolley dbcc8430e9 Installer tweaks + unit tests closes #6356 2014-11-25 17:09:24 +00:00
Mike Jolley 549d7ab2c0 Removed 'apply before tax' options for coupons - this should be the default core behaviour 2014-11-24 17:24:25 +00:00
Mike Jolley fe6d52b705 Final tax class unit tests
Closes #6357
2014-11-24 14:57:11 +00:00
Mike Jolley a7d4b89c0d test__delete_tax_rate #6357 2014-11-24 14:57:11 +00:00