From d3183d6749c95a0b98713ee0e1ecd04d76383e17 Mon Sep 17 00:00:00 2001 From: Morais Junior Date: Tue, 1 Oct 2024 16:25:23 -0300 Subject: [PATCH] Fix CI --- tests/phpunit/bootstrap.php | 4 ++++ .../class-wc-mocker-gateway-amazon-payments-advanced.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/phpunit/bootstrap.php b/tests/phpunit/bootstrap.php index 34c9a720..ba7896b6 100644 --- a/tests/phpunit/bootstrap.php +++ b/tests/phpunit/bootstrap.php @@ -5,6 +5,10 @@ * @package WC_Gateway_Amazon_Pay */ + ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL); + ini_set('display_errors', '1'); + ini_set('display_startup_errors', '1'); + $_tests_dir = getenv( 'WP_TESTS_DIR' ); if ( ! $_tests_dir ) { $_tests_dir = rtrim( sys_get_temp_dir(), '/\\' ) . '/wordpress-tests-lib'; diff --git a/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php b/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php index d249b97e..655bdd48 100644 --- a/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php +++ b/tests/phpunit/mockers/class-wc-mocker-gateway-amazon-payments-advanced.php @@ -23,7 +23,7 @@ class WC_Mocker_Gateway_Amazon_Payments_Advanced extends WC_Gateway_Amazon_Payme * * @param int|string $order_total The order total to be set. */ - public function __construct( $order_total = 50 ) { + public function __construct( int|string $order_total = 50 ) { $this->settings = WC_Amazon_Payments_Advanced_API::get_settings(); self::$order_total = $order_total;