Commit Graph

197 Commits

Author SHA1 Message Date
Mike Jolley bec084ac16
Merge pull request #18493 from liquidweb/tests/api-system-status
Add tests for the "add_order_indexes" system status tool
2018-03-01 12:03:29 +00:00
Mike Jolley 5feed3e0cc Merge branch 'master' into update/add-ext-object-cache-to-system-status 2018-02-19 14:39:31 +00:00
Steve Grunwell 7878a9582f Merge branch 'master' into tests/api-system-status 2018-02-15 23:16:58 +00:00
Rodrigo Primo 2feacfb47a Display whether or not external object cache is enabled
This commit adds a new line to the section "WordPress environment" of the system status page to indicate whether or not WP external object cache is enabled.
2018-01-29 15:56:01 -02:00
Rodrigo Primo 75fc594013 Manually fix coding standard violations that can't be fixed with phpcbf 2018-01-29 15:55:43 -02:00
Rodrigo Primo a15ecc1601 Automatically fix coding standard violations using phpcbf 2018-01-29 15:53:54 -02:00
Steve Grunwell 16b59b60a0 Merge branch 'master' into feature/post-system-status-tool-hook 2018-01-24 01:45:44 +00:00
Paul Dechov 0eebd2b72a Update payment gateway default enabled state in tests 2018-01-19 17:42:17 -05:00
Steve Grunwell 6aeba1d72a Instead of testing the output of the message, verify that the postmeta fields are being re-created. 2018-01-18 18:52:57 +00:00
Steve Grunwell 90c1a310f1 For consistency with the other endpoints, rename the 'woocommerce_rest_system_status_tool_executed' hook to 'woocommerce_rest_insert_system_status_tool'.
Reference: https://github.com/woocommerce/woocommerce/pull/18505#pullrequestreview-89828432
2018-01-18 16:59:47 +00:00
Steve Grunwell 86c449accf Add missing hard-stops and parentheses for new objects being instantiated, enabling tests/unit-tests/api/system-status.php to pass coding standard checks 2018-01-17 22:13:57 +00:00
Steve Grunwell fa42eb0edf Temporarily disable the WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar sniff at the end of the test_get_system_status_info_theme() method.
The wp_get_theme() function returns a WP_Theme object, which uses uppercase property names, which goes against typical WordPress conventions.

This uses the more modern (read: PHP_CodeSniffer 3.2.0+) syntax for temporarily disabling sniffs. For more details, please see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file.
2018-01-17 22:11:32 +00:00
Steve Grunwell 6b79619983 Add a file-level docblock for the WC_Tests_REST_System_Status class 2018-01-17 22:10:55 +00:00
Steve Grunwell 1a0fd86de5 *WHITESPACE ONLY* Fix alignment of code to satisfy PHP_CodeSniffer 2018-01-17 21:50:26 +00:00
Steve Grunwell ff0e200ae5 Introduce the woocommerce_rest_system_status_tool_executed action, which fires after one of the WooCommerce REST system status tools is executed. 2018-01-17 21:48:23 +00:00
Steve Grunwell 6261ea6cbb Temporarily disable the WordPress.NamingConventions.ValidVariableName.NotSnakeCaseMemberVar sniff at the end of the test_get_system_status_info_theme() method.
The wp_get_theme() function returns a WP_Theme object, which uses uppercase property names, which goes against typical WordPress conventions.

This uses the more modern (read: PHP_CodeSniffer 3.2.0+) syntax for temporarily disabling sniffs. For more details, please see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file.
2018-01-15 17:21:35 +00:00
Steve Grunwell 00268c0fa2 Add a file-level docblock for the WC_Tests_REST_System_Status class 2018-01-15 17:06:42 +00:00
Steve Grunwell 477245c693 The WordPress coding standards dictate that new object instantiation should always use parenthesis 2018-01-15 17:05:01 +00:00
Steve Grunwell b4f14b4958 Add missing hard-stops at the end of comments, and a missing method comment for test_execute_system_tool_add_order_indexes() 2018-01-15 17:04:27 +00:00
Steve Grunwell 1843a05ea6 *WHITESPACE ONLY* Fix alignment of code to satisfy PHP_CodeSniffer 2018-01-15 17:03:36 +00:00
Steve Grunwell 8484991f99 Add tests around the add_order_indexes system status tool.
This test ensures that indexes are created within postmeta for any orders that are missing billing_address_index and/or shipping_address_index values.
2018-01-15 16:56:44 +00:00
claudiulodro 09ef2195be Manual set order tests 2017-12-22 11:35:52 -08:00
claudiulodro 1c8dd6acbb Proposed fix for api coupon recalculating 2017-12-20 11:37:35 -08:00
Kelly Dwan 70455b79a3 Add failing tests to demonstrate problem adding & removing coupons 2017-12-19 16:46:26 -05:00
claudiulodro d60456cc73 Resolve conflicts and bring up to date with master 2017-12-04 13:56:59 -08:00
Claudio Sanches f0b6e3fc33 Test removing fee_lines from order in REST API 2017-11-21 16:07:03 -02:00
Mike Jolley facdc49fad Total should be a string 2017-11-16 19:47:34 +00:00
Claudio Sanches 876f67a5a9 Fixed non existing product on Products_API::test_get_products_without_permission 2017-11-16 16:59:21 -02:00
Claudio Sanches c140331dc3 [Unit Tests] Clean products after tested is complete 2017-11-16 16:56:30 -02:00
Mike Jolley c0bf381f22 Remove invalid test 2017-11-14 16:41:10 +00:00
Mike Jolley cf448398cd Update API 2017-11-07 19:08:06 +00:00
Mike Jolley 6d7522d864 Merge pull request #17075 from woocommerce/fix/phpunit-excluded-files
Updated tests exclusion list
2017-10-09 19:46:34 +01:00
Claudio Sanches 9721a9aca0 Removed legacy tests 2017-10-06 10:39:20 -03:00
Mike Jolley 7cb7e3c864 Test should compare objects, not arrays 2017-10-05 17:37:18 +01:00
Mike Jolley d1211f4e63 Added a test to ensure meta data gets returned in the order API 2017-10-04 15:57:06 +01:00
mitraval192 2ee59801c2 added secure link 2017-09-11 17:24:55 +05:30
Mike Jolley 1d38a92638 Fix test 2017-08-21 12:38:14 +01:00
Mike Jolley cd15e18e68 Fix failing test 2017-08-17 15:45:26 +01:00
Claudio Sanches 940019f245 Merge pull request #16103 from jconroy/api-terms-page-data
Add the "Terms and conditions" page to the api system status pages property
2017-07-13 15:17:48 -03:00
Jason Conroy d3dd9292fe Update api unit tests to check for 5 pages 2017-07-13 16:27:16 +10:00
Caleb Burks ed55ae0117 Fix “risky” tests
WC_Tests_API_Functions::test_wc_rest_check_post_permissions
This test did not perform any assertions

WC_Tests_API_Functions::test_wc_rest_check_user_permissions
This test did not perform any assertions

WC_Tests_API_Functions::test_wc_rest_check_product_term_permissions
This test did not perform any assertions
WC_Tests_API_Functions::test_wc_rest_check_manager_permissions
This test did not perform any assertions
2017-07-12 23:06:38 -05:00
Websupporter 057c8b3281 Fix typo in test
Just a quick typo fix.
2017-07-11 14:43:54 +03:00
Daniel Rey Lopez 04a83b0faa Change the "Rest of the World" zone name to "Locations not covered by your other zones" everywhere 2017-07-11 08:19:42 +01:00
Akeda Bagus 53807185a8
Fixed typos.
These typos are catched by `misspell` program.

```
find . -type f | grep -v assets | grep -v dummy-data | grep -v i18n | grep -v node_modules | grep -v .git | grep -v apigen |  xargs misspell -w
```

Some results were excluded because of 3rd party ownership and non-english
sentences.
2017-07-10 12:56:28 +07:00
Mike Jolley 77c938202f Merge branch 'add/15602-store-street-level-address'
# Conflicts:
#	assets/css/admin-rtl.css
#	assets/css/admin.css
2017-06-30 15:00:51 +01:00
Allen Snook 25c9219849 Add unit tests for new address city and postcode fields 2017-06-19 13:12:39 -07:00
claudiulodro 86c43459fc Update test 2017-06-14 11:08:39 -07:00
Claudio Sanches e86232032f Fixed tests for wc_rest_urlencode_rfc3986() 2017-06-06 17:43:40 -03:00
Justin Shreve 0c5588aac7 Makes sure that the 'base location' setting is returned to the /settings/general endpoint correctly. It uses a special setting type that the API didn't handle properly. 2017-05-15 10:21:06 -07:00
Claudio Sanches 7b5d56c643 [REST API] Adds missing "id" in shipping zone methods endpoint
This missing "id" will break CLI.

Added as duplicated with `instance_id` to keep backwards compatibility.

Fixes #14831
2017-05-02 20:37:03 -03:00