Skip to content

Commit

Permalink
Merge pull request #705 from godaddy-wordpress/release/5.14.0
Browse files Browse the repository at this point in the history
Release v5.14.0
  • Loading branch information
nmolham-godaddy authored Aug 30, 2024
2 parents 9953a85 + 0c24c03 commit 509ea95
Show file tree
Hide file tree
Showing 150 changed files with 1,831 additions and 678 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ jobs:
sudo update-alternatives --set phpize /usr/bin/phpize$PHP_VERSION
sudo update-alternatives --set php-config /usr/bin/php-config$PHP_VERSION
- name: Setup INI file
run: |
PHP_INI_LOCATION="$(php -r 'echo php_ini_loaded_file();')"
if [[ -z "$PHP_INI_LOCATION" || ! -f "$PHP_INI_LOCATION" ]]; then
echo 'Unable to determine php.ini location'
exit 1
fi
echo "zend.assertions=1" | sudo tee -a "$PHP_INI_LOCATION"
- name: Get Composer Cache Directory
id: composer-cache
run: |
Expand Down
24 changes: 23 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,31 @@
"codeception/module-asserts": "^1.3",
"10up/wp_mock": "^1.0"
},
"autoload": {
"classmap": [
"woocommerce/admin",
"woocommerce/api",
"woocommerce/compatibility",
"woocommerce/payment-gateway",
"woocommerce/rest-api",
"woocommerce/utilities",
"woocommerce/class-sv-wc-admin-notice-handler.php",
"woocommerce/class-sv-wc-framework-bootstrap.php",
"woocommerce/class-sv-wc-helper.php",
"woocommerce/class-sv-wc-hook-deprecator.php",
"woocommerce/class-sv-wc-plugin.php",
"woocommerce/class-sv-wc-plugin-compatibility.php",
"woocommerce/class-sv-wc-plugin-dependencies.php",
"woocommerce/class-sv-wc-plugin-exception.php",
"woocommerce/class-sv-wp-admin-message-handler.php"
],
"psr-4": {
"SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\": "woocommerce/"
}
},
"autoload-dev": {
"psr-4": {
"SkyVerge\\WooCommerce\\PluginFramework\\v5_13_0\\Tests\\": "tests/"
"SkyVerge\\WooCommerce\\PluginFramework\\v5_14_0\\Tests\\": "tests/"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace SkyVerge\WooCommerce\PluginFramework\v5_13_0\Tests;
namespace SkyVerge\WooCommerce\PluginFramework\v5_14_0\Tests;

use WP_Mock\Tools\TestCase as WpMockTestCase;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SV_WC_Framework_Gateway_Test_Plugin_Loader {
const MINIMUM_WC_VERSION = '3.0.9';

/** SkyVerge plugin framework version used by this plugin */
const FRAMEWORK_VERSION = '5.13.0';
const FRAMEWORK_VERSION = '5.14.0-dev.1';

/** the plugin name, for displaying notices */
const PLUGIN_NAME = 'WooCommerce Framework Gateway Test Plugin';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SkyVerge\WooCommerce\GatewayTestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace SkyVerge\WooCommerce\GatewayTestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace SkyVerge\WooCommerce\GatewayTestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
2 changes: 1 addition & 1 deletion tests/_support/plugins/test-plugin/includes/API.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace SkyVerge\WooCommerce\TestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
2 changes: 1 addition & 1 deletion tests/_support/plugins/test-plugin/includes/Gateway.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace SkyVerge\WooCommerce\TestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
2 changes: 1 addition & 1 deletion tests/_support/plugins/test-plugin/includes/Plugin.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace SkyVerge\WooCommerce\TestPlugin;

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

defined( 'ABSPATH' ) or exit;

Expand Down
2 changes: 1 addition & 1 deletion tests/_support/plugins/test-plugin/test-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class SV_WC_Framework_Test_Plugin_Loader {
const MINIMUM_WC_VERSION = '3.0.9';

/** SkyVerge plugin framework version used by this plugin */
const FRAMEWORK_VERSION = '5.13.0';
const FRAMEWORK_VERSION = '5.14.0-dev.1';

/** the plugin name, for displaying notices */
const PLUGIN_NAME = 'WooCommerce Framework Test Plugin';
Expand Down
6 changes: 0 additions & 6 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
define('PLUGIN_ROOT_DIR', dirname(__DIR__));

require_once PLUGIN_ROOT_DIR.'/vendor/autoload.php';
require_once PLUGIN_ROOT_DIR.'/woocommerce/class-sv-wc-plugin.php';
require_once PLUGIN_ROOT_DIR.'/woocommerce/class-sv-wc-plugin-exception.php';
require_once PLUGIN_ROOT_DIR.'/woocommerce/Enums/Traits/EnumTrait.php';
require_once PLUGIN_ROOT_DIR.'/woocommerce/Enums/PaymentFormContext.php';

WP_Mock::setUsePatchwork(true);
WP_Mock::bootstrap();

require_once PLUGIN_ROOT_DIR.'/woocommerce/class-sv-wc-helper.php';
10 changes: 5 additions & 5 deletions tests/integration/API/CacheableAPIBaseTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\API\Abstract_Cacheable_API_Base;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\API\Traits\Cacheable_Request_Trait;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_API_JSON_Request;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_API_Request;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\API\Abstract_Cacheable_API_Base;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\API\Traits\Cacheable_Request_Trait;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_API_JSON_Request;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_API_Request;

if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', true );
Expand Down
6 changes: 3 additions & 3 deletions tests/integration/DependenciesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Tests for the SV_WC_Plugin_Dependencies class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Dependencies
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Dependencies
*/
class DependenciesTest extends \Codeception\TestCase\WPTestCase {

Expand Down Expand Up @@ -31,7 +31,7 @@ protected function _after() {


/**
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Dependencies::get_active_scripts_optimization_plugins()
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Dependencies::get_active_scripts_optimization_plugins()
*/
public function test_get_active_scripts_optimization_plugins() {

Expand All @@ -40,7 +40,7 @@ public function test_get_active_scripts_optimization_plugins() {


/**
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Dependencies::is_scripts_optimization_plugin_active()
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Dependencies::is_scripts_optimization_plugin_active()
*/
public function test_is_scripts_optimization_plugin_active() {

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/HelperTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

/**
* Tests for the helper class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Compatibility
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Compatibility
*/
class HelperTest extends \Codeception\TestCase\WPTestCase {

Expand Down
6 changes: 3 additions & 3 deletions tests/integration/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Tests for the base plugin class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin
*/
class PluginTest extends \Codeception\TestCase\WPTestCase {

Expand Down Expand Up @@ -152,7 +152,7 @@ public function test_get_framework_assets_path() {
*/
public function test_get_dependency_handler() {

$this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Dependencies', $this->get_plugin()->get_dependency_handler() );
$this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Dependencies', $this->get_plugin()->get_dependency_handler() );
}


Expand All @@ -161,7 +161,7 @@ public function test_get_dependency_handler() {
*/
public function test_get_lifecycle_handler() {

$this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_13_0\Plugin\Lifecycle', $this->get_plugin()->get_lifecycle_handler() );
$this->assertInstanceOf( '\SkyVerge\WooCommerce\PluginFramework\v5_14_0\Plugin\Lifecycle', $this->get_plugin()->get_lifecycle_handler() );
}


Expand Down
10 changes: 5 additions & 5 deletions tests/integration/REST_API/Controllers/SettingsTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0\REST_API\Controllers\Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Control;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\REST_API\Controllers\Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Control;

/**
* Tests for the Settings class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\REST_API\Controllers\Settings
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\REST_API\Controllers\Settings
*/
class SettingsTest extends \Codeception\TestCase\WPTestCase {

Expand Down
8 changes: 4 additions & 4 deletions tests/integration/REST_API/RESTAPITest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Helper;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Helper;

/**
* Tests for the REST_API class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\REST_API
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\REST_API
*/
class RESTAPITest extends \Codeception\TestCase\WPTestCase {

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/SV_WC_Payment_Gateway_Helper_Test.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Helper;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Helper;

/**
* Tests for the Payment Gateway Helper class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Helper
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Helper
*/
class SV_WC_Payment_Gateway_Helper_Test extends \Codeception\TestCase\WPTestCase {

Expand Down
12 changes: 6 additions & 6 deletions tests/integration/Settings_API/AbstractSettingsTest.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Control;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Exception;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Abstract_Settings;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Control;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Exception;

/**
* Tests for the Abstract_Settings class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Abstract_Settings
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Abstract_Settings
*/
class AbstractSettingsTest extends \Codeception\TestCase\WPTestCase {

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/Settings_API/SettingTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Plugin_Exception;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\Settings_API\Setting;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Plugin_Exception;

class SettingTest extends \Codeception\TestCase\WPTestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/payment-gateway/GatewayPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* Tests for the gateway plugin class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Plugin
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Plugin
*/
class GatewayPluginTest extends \Codeception\TestCase\WPTestCase {

Expand Down
8 changes: 4 additions & 4 deletions tests/integration/payment-gateway/MyPaymentMethodsTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_My_Payment_Methods;
use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Plugin;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_My_Payment_Methods;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Plugin;

/**
* Tests for the SV_WC_Payment_Gateway_My_Payment_Methods class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_My_Payment_Methods
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_My_Payment_Methods
*/
class MyPaymentMethodsTest extends \Codeception\TestCase\WPTestCase {

Expand Down Expand Up @@ -116,7 +116,7 @@ public function test_render_js() {
$payment_methods->render_js();

$this->assertStringContainsString( 'function load_gateway_test_plugin_payment_methods_handler', $wc_queued_js );
$this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_methods_handler_v5_13_0_loaded\', load_gateway_test_plugin_payment_methods_handler );', $wc_queued_js );
$this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_methods_handler_v5_14_0_loaded\', load_gateway_test_plugin_payment_methods_handler );', $wc_queued_js );
}


Expand Down
6 changes: 3 additions & 3 deletions tests/integration/payment-gateway/PaymentFormTest.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Payment_Form;
use SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Payment_Form;

/**
* Tests for the SV_WC_Payment_Gateway_Payment_Form class.
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Payment_Form
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Payment_Form
*/
class PaymentFormTest extends \Codeception\TestCase\WPTestCase {

Expand Down Expand Up @@ -90,7 +90,7 @@ public function test_render_js() {
$this->get_plugin()->get_gateway()->get_payment_form_instance()->render_js();

$this->assertStringContainsString( 'function load_test_gateway_payment_form_handler', $wc_queued_js );
$this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_form_handler_v5_13_0_loaded\', load_test_gateway_payment_form_handler );', $wc_queued_js );
$this->assertStringContainsString( 'window.jQuery( document.body ).on( \'sv_wc_payment_form_handler_v5_14_0_loaded\', load_test_gateway_payment_form_handler );', $wc_queued_js );
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use \SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use \SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

/**
* Tests for the payment token object
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Payment_Token
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Payment_Token
*/
class SV_WC_Payment_Gateway_Payment_Token_Test extends \Codeception\TestCase\WPTestCase {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

use \SkyVerge\WooCommerce\PluginFramework\v5_13_0 as Framework;
use \SkyVerge\WooCommerce\PluginFramework\v5_14_0 as Framework;

/**
* Tests for the payment tokens handler object
*
* @see \SkyVerge\WooCommerce\PluginFramework\v5_13_0\SV_WC_Payment_Gateway_Payment_Tokens_Handler
* @see \SkyVerge\WooCommerce\PluginFramework\v5_14_0\SV_WC_Payment_Gateway_Payment_Tokens_Handler
*/
class SV_WC_Payment_Gateway_Payment_Tokens_Handler_Test extends \Codeception\TestCase\WPTestCase {

Expand Down
Loading

0 comments on commit 509ea95

Please sign in to comment.