diff --git a/.dockerignore b/.dockerignore index dae90b1a..502e9d24 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,4 @@ .env .github_changelog_generator -.travis.yml \ No newline at end of file +.travis.yml +codeception.yml \ No newline at end of file diff --git a/.env.dist b/.env.dist index 12537a43..b88a739b 100644 --- a/.env.dist +++ b/.env.dist @@ -24,4 +24,7 @@ TESTS_DIR=tests TESTS_OUTPUT=tests/_output TESTS_DATA=tests/_data TESTS_SUPPORT=tests/_support -TESTS_ENVS=tests/_envs \ No newline at end of file +TESTS_ENVS=tests/_envs + +CORE_BRANCH=develop +JWT_AUTH_BRANCH=master \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 17e9168e..390d2809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ branches: - master - release-v0.1.2 - release-v0.2.2 - - release-v0.3.0 + - release-v0.3.1 cache: apt: true @@ -27,17 +27,13 @@ cache: matrix: include: - php: 7.3 - env: PHP_VERSION=7.3 WP_VERSION=5.2 COVERAGE=1 + env: PHP_VERSION=7.3 WP_VERSION=5.3 - php: 7.3 env: PHP_VERSION=7.3 PHPCS=1 - php: 7.2 - env: PHP_VERSION=7.2 WP_VERSION=5.2 + env: PHP_VERSION=7.2 WP_VERSION=5.3 - php: 7.2 env: PHP_VERSION=7.2 WP_VERSION=4.9 - - php: 7.1 - env: PHP_VERSION=7.1 WP_VERSION=5.2 - - php: 7.1 - env: PHP_VERSION=7.1 WP_VERSION=4.9 - php: 7.0 env: PHP_VERSION=7.0 WP_VERSION=5.0 - php: 7.0 @@ -46,6 +42,10 @@ matrix: env: PHP_VERSION=5.6 WP_VERSION=5.0 - php: 5.6 env: PHP_VERSION=5.6 WP_VERSION=4.9 + - php: 7.1 + env: PHP_VERSION=7.1 WP_VERSION=5.3 + - php: 7.1 + env: PHP_VERSION=7.1 WP_VERSION=4.9 COVERAGE=1 allow_failures: - env: PHP_VERSION=5.6 WP_VERSION=5.0 - env: PHP_VERSION=5.6 WP_VERSION=4.9 @@ -93,11 +93,7 @@ script: # Execute unit tests with coverage if specified, otherwise without coverage - | if [ ! -z "$WP_VERSION" ]; then - docker-compose run --rm \ - -e SUITES='acceptance;functional;wpunit' \ - -e COVERAGE=${COVERAGE:-0} \ - -e DEBUG=${DEBUG:-0} \ - testing --scale app=0 + docker-compose run --rm -e COVERAGE=${COVERAGE:-0} -e DEBUG=${DEBUG:-0} testing --scale app=0 fi - | if [ "$PHPCS" == "1" ]; then @@ -117,4 +113,3 @@ after_success: sed -i 's/\/var\/www\/html\/wp-content\/plugins\/wp-graphql-woocommerce\///g' tests/_output/coverage.xml travis_retry php php-coveralls.phar -v fi - diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5d484c..47dc2f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,6 @@ [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.2-beta...v0.3.0-beta) -**Merged pull requests:** - -- Release-v0.2.2 [\#154](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/154) ([kidunot89](https://github.com/kidunot89)) - ## [v0.2.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.2-beta) (2019-10-24) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.1-beta...v0.2.2-beta) @@ -16,9 +12,6 @@ - Sorting of products, Categories etc [\#138](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/138) - Accessing meta\_data product property? [\#121](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/121) -- Improved ordering for some connections [\#145](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/145) ([kidunot89](https://github.com/kidunot89)) -- "product\_connection\_catalog\_visibility" hook implemented. [\#142](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/142) ([kidunot89](https://github.com/kidunot89)) -- "format" arg added to Product description fields [\#139](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/139) ([kidunot89](https://github.com/kidunot89)) **Fixed:** @@ -27,10 +20,6 @@ - Extension breaks the hierarchy between pages [\#122](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/122) - Order id undefined [\#119](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/119) - categoryNameIn not filtering [\#116](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/116) -- Fixes product taxonomy hierachy resolution [\#150](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/150) ([kidunot89](https://github.com/kidunot89)) -- Adds WPGraphQL JWT Auth fields to Customer type and mutations [\#148](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/148) ([kidunot89](https://github.com/kidunot89)) -- Escape hatch added on non-GraphQL requests. [\#146](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/146) ([kidunot89](https://github.com/kidunot89)) -- Release v0.2.1 [\#114](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/114) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** @@ -39,20 +28,10 @@ - Price Type, and name not showing up for product as Typed values [\#137](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/137) - Add AND and OR statement to where clause. [\#120](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/120) -**Merged pull requests:** - -- FUNDING.yml added. [\#151](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/151) ([kidunot89](https://github.com/kidunot89)) -- CONTRIBUTING.md added [\#144](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/144) ([kidunot89](https://github.com/kidunot89)) -- v0.2.1 hotfix to develop [\#135](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/135) ([kidunot89](https://github.com/kidunot89)) - ## [v0.2.1-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.1-beta) (2019-08-27) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.0-beta...v0.2.1-beta) -**Breaking changes:** - -- Release v0.2.0 [\#96](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/96) ([kidunot89](https://github.com/kidunot89)) - **Enhancements:** - Hooks for mutations [\#108](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/108) @@ -65,7 +44,6 @@ - customerRegister mutation resolves wrong object for `viewer` field [\#111](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/111) - I cant see the category thumbnail [\#93](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/93) -- Session header bugfix [\#113](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/113) ([kidunot89](https://github.com/kidunot89)) ## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11) @@ -74,24 +52,15 @@ **Fixed:** - Custom attributes of variable products cannot be queried. [\#87](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/87) -- Release v0.1.2 [\#86](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/86) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** - Customer id doesn't match user id [\#90](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/90) -**Merged pull requests:** - -- CHANGELOG updated [\#92](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/92) ([kidunot89](https://github.com/kidunot89)) - ## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta) -**Fixed:** - -- Release v0.1.1 [\#81](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/81) ([kidunot89](https://github.com/kidunot89)) - **Closed issues:** - Tests needed [\#46](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/46) @@ -100,10 +69,6 @@ [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.0-beta...v0.1.1-beta) -**Breaking changes:** - -- Release v0.1.0 [\#54](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/54) ([kidunot89](https://github.com/kidunot89)) - **Enhancements:** - Add format argument to product pricing fields [\#75](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/75) @@ -113,7 +78,6 @@ **Fixed:** - Provide guest user authentication [\#79](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/79) -- Codeception versioning problem in Travis-CI build [\#77](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/77) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** @@ -127,10 +91,6 @@ - Release v0.0.4 Summary [\#66](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/66) -**Merged pull requests:** - -- Release v0.0.4 [\#65](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/65) ([kidunot89](https://github.com/kidunot89)) - ## [v0.0.4-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.4-beta) (2019-05-10) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.3-beta...v0.0.4-beta) @@ -140,40 +100,23 @@ - Add filter for restricted\_cap in models [\#51](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/51) - Add name to ProductVariation [\#41](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/41) - Cart type and queries [\#12](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/12) -- Adds "\*\_restricted\_cap" filters [\#53](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/53) ([kidunot89](https://github.com/kidunot89)) -- ProductAttribute completion [\#50](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/50) ([kidunot89](https://github.com/kidunot89)) **Fixed:** - Query products by categories returns an empty array. [\#44](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/44) -- More ProductVariation fields [\#49](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/49) ([kidunot89](https://github.com/kidunot89)) -- Bugfix/\#44 [\#45](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/45) ([kidunot89](https://github.com/kidunot89)) - -**Merged pull requests:** - -- to v0.0.3 [\#43](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/43) ([kidunot89](https://github.com/kidunot89)) ## [v0.0.3-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.3-beta) (2019-04-25) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.2-beta...v0.0.3-beta) -**Enhancements:** - -- Cart-type and queries and customer query [\#30](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/30) ([kidunot89](https://github.com/kidunot89)) - **Fixed:** - Pagination broken [\#29](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/29) -- Pagination fix for CPT-backed CRUD objects connections [\#36](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/36) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** - Unsetting "object\_ids" on all connections [\#39](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/39) -**Merged pull requests:** - -- Master [\#35](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/35) ([kidunot89](https://github.com/kidunot89)) - ## [v0.0.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.2-beta) (2019-04-22) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/0db77c26ab463e6203df99eed2679f79ce3e4d60...v0.0.2-beta) @@ -182,22 +125,10 @@ - TaxClass type [\#27](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/27) - Order-Item type queries [\#13](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/13) -- Order items, TaxRate, and ShippingMethod [\#28](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/28) ([kidunot89](https://github.com/kidunot89)) -- Where args for Coupon, Order, and Refund connections [\#24](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/24) ([kidunot89](https://github.com/kidunot89)) -- Testing and CI renovation [\#21](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/21) ([kidunot89](https://github.com/kidunot89)) -- WPGraphQL v0.3.0 migration [\#9](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/9) ([kidunot89](https://github.com/kidunot89)) **Fixed:** - no queries work [\#31](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/31) -- after\_success script added [\#32](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/32) ([kidunot89](https://github.com/kidunot89)) -- Polishing Product types and connections [\#22](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/22) ([kidunot89](https://github.com/kidunot89)) - -**Merged pull requests:** - -- Formatting code to WordPress Coding Standards [\#8](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/8) ([kidunot89](https://github.com/kidunot89)) -- Feature/Product type [\#7](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/7) ([kidunot89](https://github.com/kidunot89)) -- Feature/coupon type [\#6](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/6) ([kidunot89](https://github.com/kidunot89)) diff --git a/bin/install-wp-tests.sh b/bin/install-wp-tests.sh index 58164eda..819ab051 100755 --- a/bin/install-wp-tests.sh +++ b/bin/install-wp-tests.sh @@ -20,27 +20,17 @@ if [[ -z "$TEST_DB_USER" ]]; then else DB_USER=$TEST_DB_USER fi -if [[ -z "$TEST_DB_PASSWORD" ]]; then - DB_PASS="" -else - DB_PASS=$TEST_DB_PASSWORD -fi -if [[ -z "$TEST_DB_HOST" ]]; then - DB_HOST=localhost -else - DB_HOST=$TEST_DB_HOST -fi -if [ -z "$SKIP_DB_CREATE" ]; then - SKIP_DB_CREATE=false -fi +DB_HOST=${TEST_DB_HOST-localhost} +DB_PASS=${TEST_DB_PASSWORD-""} WP_VERSION=${WP_VERSION-latest} TMPDIR=${TMPDIR-/tmp} TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//") WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib} -WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/} +WP_CORE_DIR=${TEST_WP_ROOT_FOLDER-$TMPDIR/wordpress/} PLUGIN_DIR=$(pwd) DB_SERVE_NAME=${DB_SERVE_NAME-woographql_serve} +SKIP_DB_CREATE=${SKIP_DB_CREATE-false} download() { if [ `which curl` ]; then @@ -193,14 +183,14 @@ setup_woocommerce() { setup_wpgraphql() { if [ ! -d $WP_CORE_DIR/wp-content/plugins/wp-graphql ]; then echo "Cloning WPGraphQL" - wp plugin install https://github.com/wp-graphql/wp-graphql/archive/master.zip + wp plugin install https://github.com/wp-graphql/wp-graphql/archive/${CORE_BRANCH-master}.zip fi echo "Activating WPGraphQL" wp plugin activate wp-graphql if [ ! -d $WP_CORE_DIR/wp-content/plugins/wp-graphql-jwt-authentication ]; then echo "Cloning WPGraphQL-JWT-Authentication" - wp plugin install https://github.com/wp-graphql/wp-graphql-jwt-authentication/archive/master.zip + wp plugin install https://github.com/wp-graphql/wp-graphql-jwt-authentication/archive/${JWT_AUTH_BRANCH-master}.zip fi echo "Activating WPGraphQL-JWT-Authentication" wp plugin activate wp-graphql-jwt-authentication diff --git a/bin/testing-entrypoint.sh b/bin/testing-entrypoint.sh index 412d1424..c0f335f3 100644 --- a/bin/testing-entrypoint.sh +++ b/bin/testing-entrypoint.sh @@ -35,23 +35,30 @@ echo "Setting Codeception output directory permissions" chmod 777 ${TESTS_OUTPUT} if [[ -z "$SUITES" ]]; then - echo 'A target testing suite(s) must be selected.' - echo 'Using the environment variable "$SUITES" set on the "testing" service.' - exit 1 + if [ "$COVERAGE" == "1" -a "$DEBUG" == "1" ]; then + vendor/bin/codecept run --debug --coverage --coverage-xml + elif [ "$COVERAGE" == "1" ]; then + vendor/bin/codecept run --coverage --coverage-xml + elif [ "$DEBUG" == "1" ]; then + vendor/bin/codecept run --debug + else + vendor/bin/codecept run + fi +else + IFS=';' read -ra target_suites <<< "$SUITES" + for suite in "${target_suites[@]}"; do + if [ "$COVERAGE" == "1" -a "$DEBUG" == "1" ]; then + vendor/bin/codecept run ${suite} --debug --coverage --coverage-xml + elif [ "$COVERAGE" == "1" ]; then + vendor/bin/codecept run ${suite} --coverage --coverage-xml + elif [ "$DEBUG" == "1" ]; then + vendor/bin/codecept run ${suite} --debug + else + vendor/bin/codecept run ${suite} + fi + done fi -IFS=';' read -ra target_suites <<< "$SUITES" -for suite in "${target_suites[@]}"; do - if [ "$COVERAGE" == "1" -a "$DEBUG" == "1" ]; then - vendor/bin/codecept run ${suite} --debug --coverage --coverage-xml - elif [ "$COVERAGE" == "1" ]; then - vendor/bin/codecept run ${suite} --coverage --coverage-xml - elif [ "$DEBUG" == "1" ]; then - vendor/bin/codecept run ${suite} --debug - else - vendor/bin/codecept run ${suite} - fi -done if [ -f "${TESTS_OUTPUT}" ]; then echo 'Setting "coverage.xml" permissions'. diff --git a/composer.json b/composer.json index c4713a36..cc569061 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "wp-graphql/wp-graphql-woocommerce", - "description": "WooCommerce bindings for wp-graphql", - "version": "0.3.0", + "description": "WooCommerce bindings for WPGraphQL", + "version": "0.3.1", "type": "wordpress-plugin", "keywords": [ "wordpress", @@ -32,7 +32,8 @@ }, "autoload": { "files":[ - "includes/connection/common-post-type-args.php" + "includes/connection/common-post-type-args.php", + "includes/functions.php" ], "psr-4": { "WPGraphQL\\WooCommerce\\": "includes/" diff --git a/includes/class-core-schema-filters.php b/includes/class-core-schema-filters.php index d06534e0..d948ee54 100644 --- a/includes/class-core-schema-filters.php +++ b/includes/class-core-schema-filters.php @@ -36,7 +36,6 @@ class Core_Schema_Filters { // Registers WooCommerce CPTs. add_filter( 'register_post_type_args', array( __CLASS__, 'register_post_types' ), 10, 2 ); add_filter( 'graphql_post_entities_allowed_post_types', array( __CLASS__, 'skip_type_registry' ), 10 ); - add_filter( 'graphql_union_resolve_type', array( __CLASS__, 'graphql_union_resolve_type' ), 10, 3 ); // Registers WooCommerce taxonomies. add_filter( 'register_taxonomy_args', array( __CLASS__, 'register_taxonomy_args' ), 10, 2 ); diff --git a/includes/class-wp-graphql-woocommerce.php b/includes/class-wp-graphql-woocommerce.php index 4116c239..98cb1fa1 100644 --- a/includes/class-wp-graphql-woocommerce.php +++ b/includes/class-wp-graphql-woocommerce.php @@ -1,7 +1,5 @@ function () { return ! is_null( $this->data->is_purchasable() ) ? $this->data->is_purchasable() : null; }, - 'link' => function () { - $link = get_permalink( $this->data->ID ); - return ! empty( $link ) ? $link : null; - }, /** * Connection resolvers fields * @@ -264,6 +260,9 @@ class Product extends Crud_CPT { 'parent_id' => function() { return ! empty( $this->data->get_parent_id() ) ? $this->data->get_parent_id() : null; }, + 'post' => function() { + return ! empty( $this->data->post ) ? $this->data->post : null; + }, ); if ( 'grouped' !== $this->data->get_type() ) { diff --git a/includes/type/interface/class-product.php b/includes/type/interface/class-product.php index c8daea7e..92b793c8 100644 --- a/includes/type/interface/class-product.php +++ b/includes/type/interface/class-product.php @@ -273,6 +273,10 @@ class Product { 'link' => array( 'type' => 'String', 'description' => __( 'The permalink of the post', 'wp-graphql' ), + 'resolve' => function( $source ) { + $permalink = get_post_permalink( $source->ID ); + return ! empty( $permalink ) ? $permalink : null; + }, ), ); } diff --git a/tests/_support/Helper/crud-helpers/product.php b/tests/_support/Helper/crud-helpers/product.php index 94acac2d..dd3389c7 100644 --- a/tests/_support/Helper/crud-helpers/product.php +++ b/tests/_support/Helper/crud-helpers/product.php @@ -366,7 +366,7 @@ class ProductHelper extends WCG_Helper { 'purchasable' => $data->is_purchasable(), 'shippingRequired' => $data->needs_shipping(), 'shippingTaxable' => $data->is_shipping_taxable(), - 'link' => get_permalink( $data->get_id() ), + 'link' => get_post_permalink( $id ), ); } diff --git a/tests/wpunit/CartMutationsTest.php b/tests/wpunit/CartMutationsTest.php index 8411914f..58f5cb20 100644 --- a/tests/wpunit/CartMutationsTest.php +++ b/tests/wpunit/CartMutationsTest.php @@ -191,7 +191,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testAddToCartMutationWithProductVariation() { @@ -241,7 +241,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testUpdateCartItemQuantitiesMutation() { @@ -340,7 +340,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRemoveItemsFromCartMutation() { @@ -380,7 +380,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertEmpty( \WC()->cart->get_cart_item( $key ) ); } @@ -440,7 +440,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertEmpty( \WC()->cart->get_cart_item( $key1 ) ); $this->assertEmpty( \WC()->cart->get_cart_item( $key2 ) ); } @@ -501,7 +501,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertTrue( \WC()->cart->is_empty() ); } @@ -552,7 +552,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertNotEmpty( \WC()->cart->get_cart_item( $key ) ); } @@ -619,7 +619,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertNotEmpty( \WC()->cart->get_cart_item( $key1 ) ); $this->assertNotEmpty( \WC()->cart->get_cart_item( $key2 ) ); } @@ -708,7 +708,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->assertTrue( \WC()->cart->is_empty() ); } @@ -815,7 +815,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $new_total = \WC()->cart->get_cart_contents_total(); @@ -922,7 +922,7 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testAddFeeMutation() { @@ -997,6 +997,6 @@ class CartMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/CartQueriesTest.php b/tests/wpunit/CartQueriesTest.php index e05f2562..57ded946 100644 --- a/tests/wpunit/CartQueriesTest.php +++ b/tests/wpunit/CartQueriesTest.php @@ -67,7 +67,7 @@ class CartQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCartItemQuery() { @@ -112,7 +112,7 @@ class CartQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCartItemConnection() { @@ -160,7 +160,7 @@ class CartQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCartFeeQuery() { @@ -192,7 +192,7 @@ class CartQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCartToCartFeeQuery() { @@ -225,6 +225,6 @@ class CartQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/CheckoutMutationsTest.php b/tests/wpunit/CheckoutMutationsTest.php index 52c5d5e0..9a0cad3c 100644 --- a/tests/wpunit/CheckoutMutationsTest.php +++ b/tests/wpunit/CheckoutMutationsTest.php @@ -431,7 +431,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { ) ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCheckoutOrderMutationWithNewAccount() { @@ -616,7 +616,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { ) ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCheckoutOrderMutationWithNoAccount() { @@ -805,6 +805,6 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { ) ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/CouponQueriesTest.php b/tests/wpunit/CouponQueriesTest.php index 0f9cb223..528ec1c3 100644 --- a/tests/wpunit/CouponQueriesTest.php +++ b/tests/wpunit/CouponQueriesTest.php @@ -96,7 +96,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCouponByQueryAndArgs() { @@ -123,7 +123,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -137,7 +137,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -151,7 +151,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCouponsQueryAndWhereArgs() { @@ -195,7 +195,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** @@ -210,7 +210,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -239,7 +239,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Four @@ -267,7 +267,7 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Five @@ -295,6 +295,6 @@ class CouponQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/CustomerMutationsTest.php b/tests/wpunit/CustomerMutationsTest.php index f8c69bcf..8ac4b3f3 100644 --- a/tests/wpunit/CustomerMutationsTest.php +++ b/tests/wpunit/CustomerMutationsTest.php @@ -247,7 +247,7 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRegisterMutationWithBillingInfo() { @@ -296,7 +296,7 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRegisterMutationWithShippingSameAsBillingInfo() { @@ -349,7 +349,7 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRegisterMutationWithBillingAndShippingInfo() { @@ -399,7 +399,7 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testUpdateMutation() { @@ -458,7 +458,7 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testUpdateMutationWithShippingSameAsBilling() { @@ -516,6 +516,6 @@ class CustomerMutationsTest extends \Codeception\TestCase\WPTestCase { ), ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/CustomerQueriesTest.php b/tests/wpunit/CustomerQueriesTest.php index 6298e70c..920e53a9 100644 --- a/tests/wpunit/CustomerQueriesTest.php +++ b/tests/wpunit/CustomerQueriesTest.php @@ -91,7 +91,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear customer cache. $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_customer' ); @@ -108,7 +108,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear customer cache. $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_customer' ); @@ -127,7 +127,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected['data'], $actual['data'] ); + $this->assertEquals( $expected['data'], $actual['data'] ); $this->assertArrayHasKey('errors', $actual ); // Clear customer cache. @@ -145,7 +145,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCustomerByQuery() { @@ -215,7 +215,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear customer cache. $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_customer' ); @@ -233,7 +233,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCustomersQueryAndWhereArgs() { @@ -288,7 +288,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear customer cache. $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_customer' ); @@ -311,7 +311,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -339,7 +339,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Four @@ -366,7 +366,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Five @@ -393,7 +393,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Six @@ -421,7 +421,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Seven @@ -449,7 +449,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Eight @@ -477,7 +477,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Nine @@ -505,7 +505,7 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Ten @@ -539,6 +539,6 @@ class CustomerQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/MetaDataQueriesTest.php b/tests/wpunit/MetaDataQueriesTest.php index 150b1b7e..b4c1d560 100644 --- a/tests/wpunit/MetaDataQueriesTest.php +++ b/tests/wpunit/MetaDataQueriesTest.php @@ -135,7 +135,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -167,7 +167,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -199,7 +199,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCouponMetaDataQueries() { @@ -250,7 +250,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -276,7 +276,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -302,7 +302,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Four @@ -332,7 +332,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Five @@ -362,7 +362,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Six @@ -396,7 +396,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testCustomerMetaDataQueries() { @@ -438,7 +438,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testOrderMetaDataQueries() { @@ -510,7 +510,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductMetaDataQueries() { @@ -560,7 +560,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductVariationMetaDataQueries() { @@ -608,7 +608,7 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRefundMetaDataQueries() { @@ -656,6 +656,6 @@ class MetaDataQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/OrderMutationsTest.php b/tests/wpunit/OrderMutationsTest.php index 946e5169..ba292393 100644 --- a/tests/wpunit/OrderMutationsTest.php +++ b/tests/wpunit/OrderMutationsTest.php @@ -450,7 +450,7 @@ class OrderMutationsTest extends \Codeception\TestCase\WPTestCase { ) ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testUpdateOrderMutation() { diff --git a/tests/wpunit/OrderQueriesTest.php b/tests/wpunit/OrderQueriesTest.php index 68a24620..23205de4 100644 --- a/tests/wpunit/OrderQueriesTest.php +++ b/tests/wpunit/OrderQueriesTest.php @@ -120,7 +120,7 @@ class OrderQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear loader cache. $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_post_crud' ); @@ -138,7 +138,7 @@ class OrderQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testOrderByQueryAndArgs() { @@ -164,7 +164,7 @@ class OrderQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -178,7 +178,7 @@ class OrderQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -192,7 +192,7 @@ class OrderQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testOrdersQueryAndWhereArgs() { diff --git a/tests/wpunit/ProductAttributeQueriesTest.php b/tests/wpunit/ProductAttributeQueriesTest.php index d8547daf..d4fe8e4b 100644 --- a/tests/wpunit/ProductAttributeQueriesTest.php +++ b/tests/wpunit/ProductAttributeQueriesTest.php @@ -67,7 +67,7 @@ class ProductAttributeQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductAttributeToProductConnectionQuery() { @@ -116,7 +116,7 @@ class ProductAttributeQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductAttributeToVariationConnectionQuery() { @@ -173,6 +173,6 @@ class ProductAttributeQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/tests/wpunit/ProductQueriesTest.php b/tests/wpunit/ProductQueriesTest.php index ee8579fd..fa53e7b8 100644 --- a/tests/wpunit/ProductQueriesTest.php +++ b/tests/wpunit/ProductQueriesTest.php @@ -127,7 +127,7 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); // Clear cache $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_post_crud' ); @@ -156,7 +156,7 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductTaxonomies() { @@ -1068,7 +1068,7 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testGroupProductConnections() { @@ -1107,7 +1107,7 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testRelatedProductConnections() { @@ -1161,6 +1161,6 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/ProductVariationQueriesTest.php b/tests/wpunit/ProductVariationQueriesTest.php index bb254225..51aa0f7c 100644 --- a/tests/wpunit/ProductVariationQueriesTest.php +++ b/tests/wpunit/ProductVariationQueriesTest.php @@ -86,7 +86,7 @@ class ProductVariationQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); $this->getModule('\Helper\Wpunit')->clear_loader_cache( 'wc_post_crud' ); @@ -102,7 +102,7 @@ class ProductVariationQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testVariationsQueryAndWhereArgs() { @@ -173,7 +173,7 @@ class ProductVariationQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -206,7 +206,7 @@ class ProductVariationQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductVariationToMediaItemConnections() { diff --git a/tests/wpunit/RefundQueriesTest.php b/tests/wpunit/RefundQueriesTest.php index 6c096d4c..9ddad2b3 100644 --- a/tests/wpunit/RefundQueriesTest.php +++ b/tests/wpunit/RefundQueriesTest.php @@ -110,7 +110,7 @@ class RefundQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -160,7 +160,7 @@ class RefundQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -180,7 +180,7 @@ class RefundQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Three @@ -209,7 +209,7 @@ class RefundQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Four @@ -237,6 +237,6 @@ class RefundQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/ShippingMethodQueriesTest.php b/tests/wpunit/ShippingMethodQueriesTest.php index dc8dab69..c55c3092 100644 --- a/tests/wpunit/ShippingMethodQueriesTest.php +++ b/tests/wpunit/ShippingMethodQueriesTest.php @@ -50,7 +50,7 @@ class ShippingMethodQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -64,7 +64,7 @@ class ShippingMethodQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } @@ -100,6 +100,6 @@ class ShippingMethodQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/TaxRateQueriesTest.php b/tests/wpunit/TaxRateQueriesTest.php index 10f8e12e..45203e0b 100644 --- a/tests/wpunit/TaxRateQueriesTest.php +++ b/tests/wpunit/TaxRateQueriesTest.php @@ -59,7 +59,7 @@ class TaxRateQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -73,7 +73,7 @@ class TaxRateQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testTaxesQuery() { @@ -127,7 +127,7 @@ class TaxRateQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); /** * Assertion Two @@ -160,6 +160,6 @@ class TaxRateQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } diff --git a/tests/wpunit/VariationAttributeQueriesTest.php b/tests/wpunit/VariationAttributeQueriesTest.php index 8b7cff0b..3e86e7b3 100644 --- a/tests/wpunit/VariationAttributeQueriesTest.php +++ b/tests/wpunit/VariationAttributeQueriesTest.php @@ -63,7 +63,7 @@ class VariationAttributeQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } public function testProductToVariationAttributeQuery() { @@ -104,7 +104,7 @@ class VariationAttributeQueriesTest extends \Codeception\TestCase\WPTestCase { // use --debug flag to view. codecept_debug( $actual ); - $this->assertEqualSets( $expected, $actual ); + $this->assertEquals( $expected, $actual ); } } \ No newline at end of file diff --git a/vendor/autoload.php b/vendor/autoload.php index 892be825..414da29c 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868::getLoader(); +return ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517::getLoader(); diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index 707366f2..aef00ef4 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -7,4 +7,5 @@ $baseDir = dirname($vendorDir); return array( '914b07b8cf678ed0b81bfdb5d23b4f2b' => $baseDir . '/includes/connection/common-post-type-args.php', + '45a15019e901000ab8608c03ebff44fb' => $baseDir . '/includes/functions.php', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index cfbdc220..5917c944 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868 +class ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcece0dfed0b70a4b4547c45015505517::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInit71eeabde6fbf0f089c103ca7b0ed7868 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire71eeabde6fbf0f089c103ca7b0ed7868($fileIdentifier, $file); + composerRequirecece0dfed0b70a4b4547c45015505517($fileIdentifier, $file); } return $loader; } } -function composerRequire71eeabde6fbf0f089c103ca7b0ed7868($fileIdentifier, $file) +function composerRequirecece0dfed0b70a4b4547c45015505517($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index edf83886..983bce8a 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,10 +4,11 @@ namespace Composer\Autoload; -class ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868 +class ComposerStaticInitcece0dfed0b70a4b4547c45015505517 { public static $files = array ( '914b07b8cf678ed0b81bfdb5d23b4f2b' => __DIR__ . '/../..' . '/includes/connection/common-post-type-args.php', + '45a15019e901000ab8608c03ebff44fb' => __DIR__ . '/../..' . '/includes/functions.php', ); public static $prefixLengthsPsr4 = array ( @@ -147,9 +148,9 @@ class ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit71eeabde6fbf0f089c103ca7b0ed7868::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$classMap; }, null, ClassLoader::class); } diff --git a/wp-graphql-woocommerce.php b/wp-graphql-woocommerce.php index e09f4e74..3fe2e5ce 100644 --- a/wp-graphql-woocommerce.php +++ b/wp-graphql-woocommerce.php @@ -3,13 +3,15 @@ * Plugin Name: WP GraphQL WooCommerce * Plugin URI: https://github.com/kidunot89/wp-graphql-woocommerce * Description: Adds Woocommerce Functionality to WPGraphQL schema. - * Version: 0.3.0 + * Version: 0.3.1 * Author: kidunot89 * Author URI: https://axistaylor.com * Text Domain: wp-graphql-woocommerce * Domain Path: /languages * License: GPL-3 * License URI: https://www.gnu.org/licenses/gpl-3.0.html + * WC requires at least: 3.0.0 + * WC tested up to: 3.7.1 * * @package WPGraphQL\WooCommerce * @author kidunot89