Mike Jolley
8d76396eaf
Merge pull request #10588 from justinshreve/payment-tokens-wc-data
...
Convert WC_Payment_Tokens to use the new WC_Data
2016-03-22 14:14:29 +00:00
Justin Shreve
1d35fd6d73
Convert WC_Payment_Tokens (and CC/eCheck tokens) to use the new WC_Data and meta handling code.
2016-03-21 11:06:17 -07:00
Justin Shreve
705213d4f5
Move meta_id into the _meta_data array instead of trying to use them as array keys.
...
This is so we can just use PHP's keys, instead of trying to add new meta and guess an avaible key.
2016-03-18 12:24:35 -07:00
Justin Shreve
5d6cdd05f1
Finish out tests, make sure to use cprrect meta ID field in order by clause.
2016-03-14 11:12:47 -07:00
Justin Shreve
97c0edf445
Start on tests for testing CRUD meta.
...
Includes Mock object for testing against the abstract WC_Data.
2016-03-14 11:12:47 -07:00
Justin Shreve
ea260254c1
Fix feedback.
2016-03-14 09:41:37 -07:00
Justin Shreve
5dbfc7ae16
Fix Payment Token 'set default' methods. Makes sure we are using the user ID of the payment token, and not the current user.
...
Also makes sure to properly unset other tokens when a new one is set as default. Finally, we make sure that a user is always set in our payment token tests (which was broken in some WP versions which alerted us to some broken tests).
2016-03-14 09:41:37 -07:00
Mike Jolley
333a391406
Remove wc_get_account_orders_query_args
...
#10500
2016-03-09 13:26:54 +00:00
Justin Shreve
49c45c6dc1
Make sure the is_default/default token ability works correctly. Also adds a new method for getting a users default token. Fixes up some docblocks.
2016-03-01 11:49:42 -08:00
Justin Shreve
c0b74296ff
* Remove WC_Payment_Gateway_Form in favor of having a Payment_Gateway_CC and Payment_Gateway_eCheck
...
* Fix up some comments to match other comments in the WC code base
* Add some missing esc_* functions
* Add a gateway filter to get_customer_tokens + a test for it
2016-03-01 11:49:42 -08:00
Justin Shreve
5d8967c7d7
Prepare a list of payment methods for output on the payment methods "my account" page.
2016-03-01 11:49:40 -08:00
Justin Shreve
8f27a3b3af
Full set of tests for the payment token API
2016-03-01 11:49:40 -08:00
Mike Jolley
a6cdabff7e
[2.5] Multibyte safe trim string
...
Fixes #10378
2016-02-23 11:40:16 +00:00
Claudio Sanches
7acc0b0c94
Fix unit tests
2016-02-16 13:57:46 -02:00
Claudio Sanches
6993e52ce5
Account functions tests
2016-02-16 13:50:06 -02:00
Matty
53c0f6c712
Adds a test with incorrect values, to ensure the wc_format_country_state_string() function handles this as expected.
2016-02-16 11:05:32 +02:00
Matty
05b2d4597c
Adds a unit test for wc_format_country_state_string().
2016-02-16 09:31:29 +02:00
Claudio Sanches
b71dfff8f5
[TESTS] missing ;
2016-02-11 18:01:38 -02:00
Claudio Sanches
1d2f4d21e1
[TESTS] Fixed write context fatal error
2016-02-11 17:47:03 -02:00
Claudio Sanches
3235ba177c
Allow phpunit to check php syntax
2016-02-11 17:44:44 -02:00
Mike Jolley
fab8a871aa
Merge branch 'master' into shipping-zones
...
# Conflicts:
# assets/css/admin.css
# includes/admin/class-wc-admin-assets.php
2016-02-10 14:12:39 +00:00
Mike Jolley
75c264837f
Justins feedback/code tidy
2016-02-10 13:21:16 +00:00
jamez
5256cf47dc
Canada Postal code validation
...
Added Postal Code validation for Canada (country-code=CA). Also added
to the validation unit test for valid and invalid postal code examples.
2016-02-09 12:39:09 -05:00
Mike Jolley
352184cc06
Merge branch 'master' into shipping-zones
...
# Conflicts:
# assets/css/admin.css
# i18n/languages/woocommerce.pot
# includes/abstracts/abstract-wc-payment-gateway.php
# includes/abstracts/abstract-wc-shipping-method.php
# includes/admin/settings/class-wc-settings-shipping.php
# includes/wc-core-functions.php
# uninstall.php
2016-02-05 14:58:48 +00:00
Shiva Poudel
27532a80ba
Fix - Unit test for woocommerce currencies
2016-01-27 12:02:43 +05:45
Claudio Sanches
2cc13b6409
Fixed unit tests #10114
2016-01-21 20:19:03 -02:00
Joey Kudish
ece376bac1
weight/dim normalization: allow custom from unit
...
Add a third optional parameter to the weight and dimension normalization
functions in order to be able to specify a specific "from unit" instead
of using the site option. This allows arbitrary conversions between
different units of measure; which is particularly useful for extensions
that need to perform arbitrary unit conversions (e.g. shipping extension
that specifies custom box formats).
Also includes updated tests.
2016-01-12 22:48:56 -08:00
Mike Jolley
bdb8de7785
Zone unit tests
2016-01-08 14:53:24 +00:00
Mike Jolley
a33b9b9750
Unit tests for shipping zones
2016-01-08 13:56:01 +00:00
Mike Jolley
97d47fb576
Move zones to main settings
2016-01-05 11:23:15 +00:00
Shiva Poudel
4146558fd6
Updated the currency code for 'Lao Kip'
...
See: https://en.wikipedia.org/wiki/ISO_4217
2015-12-17 11:52:38 +05:45
Claudio Sanches
a7333a6e10
Fixed unittest dependencies
2015-12-15 16:41:07 -02:00
Claudio Sanches
4f6c17a6a1
Fixed test for get_woocommerce_currencies()
2015-12-09 16:38:57 -02:00
Takashi Irie
d88ba80f84
Edits for Twnety Sixteen
2015-11-23 11:55:50 +00:00
Claudio Sanches
5893875b0c
Removed period for file headers
2015-11-03 11:53:50 -02:00
Claudio Sanches
ee30b5b308
Fixed php docs standards
2015-11-03 11:31:20 -02:00
Mike Jolley
92310feb98
Merge pull request #9457 from woothemes/9251-wc-cart-functions
...
Moving some methods from WC_Cart to new functions
2015-10-30 13:12:55 +00:00
Claudio Sanches
0ff88deb98
Improved wc_coupons_enabled() name and description
2015-10-29 17:23:10 -02:00
Claudio Sanches
a7028e7734
Fixed tests for get_woocommerce_currencies()
2015-10-28 16:24:17 -02:00
Claudio Sanches
f3694cf17b
Fixed tests for the new cart and coupons functions
2015-10-28 16:09:53 -02:00
Jeff Stieler
513e95838b
Use the same default WP test lib directory as the updated test installer script.
...
The previous version of WP-CLI’s install.sh didn’t take environmental variables into account.
2015-10-20 10:24:46 -06:00
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