Rodrigo Primo
18ee70918b
Fix PHPCS violations in tests/ using PHPCBF
...
This commit fixes all 1533 PHPCS errors that PHPCBF can fix automatically in the tests/ directory. Before this change there was a total of 3106 PHPCS errors in the WooCommerce repository and now there is 1573 errors.
2019-05-01 19:05:00 -03:00
claudiulodro
00e9af285c
Fix shipping tests and clean up code
2018-08-27 13:14:32 -07:00
claudiulodro
2466728183
Set up unit tests for v3 api and v2 api
2018-08-24 08:49:37 -07:00
Rodrigo Primo
7d5f6d3746
Remove WC API unit tests cleanup code
...
WC unit tests don't need to remove data from the database before finishing. `WP_UnitTestCase` creates a transaction before each test starts and roll it back after it ends, so data is never actually written to the database. This simplifies the tests and makes them faster.
2018-05-04 11:45:30 -03:00
Rodrigo Primo
7ce69dfca2
PHPCS fixes
2018-05-04 11:42:45 -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
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
Mike Jolley
4b0fff3437
Fix zone routes in CLI
...
Fixes #14750
2017-04-28 15:49:51 +01:00
Mike Jolley
819448daf5
Fix unit test
2017-03-24 11:35:54 +00:00
Mike Jolley
9af295d618
Merge pull request #13753 from woocommerce/fix/rest-api-shipping-zones-schema
...
[REST API] Fixed shipping zones schema
2017-03-24 10:38:51 +00:00
Claudio Sanches
7a671ab8a5
[REST API] Fixed shipping zone locations schema
...
This also fix improper sanitization and validation of the items.
2017-03-23 21:44:46 -03:00
Claudio Sanches
c369cdc8bd
Fixed shipping zones schema unit tests
2017-03-23 20:56:41 -03:00
Claudio Sanches
59c2849736
Changed version 2.7 to 3.0
2017-03-15 13:36:53 -03:00
Claudio Sanches
9ac1ebe748
Updated unit tests for REST API
2017-02-09 18:21:52 -02:00
Justin Shreve
23a325ca8d
Make sure we error out on read if a zone is not found.
2016-11-16 04:53:23 -08:00
Claudio Sanches
657c312cae
Fix strings case ( #12069 )
...
* Fixed case for all _e, esc_attr_e and esc_html_e strings
* Fixed case for all _n_noop strings
* Fixed case for all _x strings
* Fixed case for all __, esc_html__ and esc_attr__ strings
* Fixed a few more strings
* Fixed strings in unit tests
* Fix PayPal Standard case.
* Save Order text
2016-10-12 11:16:30 +01:00
Justin Shreve
a36b25a68f
Add setting validation to the REST API
2016-09-08 15:20:15 -07:00
Mike Jolley
402d0ff077
Merge branch 'master' into pr/11797
...
# Conflicts:
# includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php
# includes/api/class-wc-rest-coupons-controller.php
# includes/class-wc-coupon.php
# tests/unit-tests/api/coupons.php
# tests/unit-tests/coupon/crud.php
2016-09-01 11:43:31 +01:00
Justin Shreve
de4296dd15
Add some missing API pieces:
...
* Value was missing from the settings schema (but was still present in the response).
* Added delete endpoint for shipping zones.
* Corrected permissions check/error for shipping zone methods.
2016-08-29 10:22:29 -07:00
Aristeides Stathopoulos
f2730eea02
WordPress.WhiteSpace.ControlStructureSpacing.BlankLineAfterEnd
2016-08-27 08:57:05 +03:00
Aristeides Stathopoulos
82f3cc221e
WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeOpenParenthesis
2016-08-27 07:23:02 +03:00
Justin Shreve
147c18c197
Add the ability to update/create/delete shipping method instances
2016-08-25 20:34:26 -07:00
Justin Shreve
9396c5436b
Make sure that the create shipping zone uses the correct permissions function. Also makes sure creating the shipping zone returns 201, with the location of the new entity, like other endpoints.
2016-08-02 10:26:26 -07:00
Justin Shreve
9a03eb4407
Use the new API test base for shipping zone tests.
2016-08-02 10:10:47 -07:00
Justin Shreve
33e0b367ac
Add new line at end of files.
2016-08-02 10:10:47 -07:00
Jeff Stieler
105064ad26
Test coverage for getting a single shipping zone method.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e007bc1778
Test coverage for all shipping zone methods endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
cdc90f5633
Test coverage for shipping zone method routes.
2016-08-02 10:10:47 -07:00
Jeff Stieler
b9a0367cfa
Test coverage for update shipping zone locations endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e5fac4911e
Test coverage for requesting shipping zone locations with an invalid ID.
2016-08-02 10:10:47 -07:00
Jeff Stieler
0db15c5328
Add test coverage for shipping zone locations retrieval endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
9946d028f2
Add “described by” link to shipping zones endpoint response.
2016-08-02 10:10:47 -07:00
Jeff Stieler
9b564b87b1
Add test coverage to single shipping zone retrieval endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
6a9ba5b9f3
Add test coverage for shipping zone update endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e037cf661e
Add test coverage to shipping zone creation endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
3492f397d4
Add test coverage for shipping zone schema endpoint.
2016-08-02 10:10:47 -07:00
Jeff Stieler
e4ccede35f
Test coverage for /shipping/zones.
...
Covers success, shipping disabled, and insufficient permissions cases.
2016-08-02 10:10:47 -07:00
Jeff Stieler
bbe5ffc295
Add helper method to create shipping zones during testing.
2016-08-02 10:10:47 -07:00
Jeff Stieler
2a7e81a809
Initial Shipping Zones unit test coverage, testing route registration.
2016-08-02 10:10:47 -07:00