From 5ebce7ad0613062b74f9d45fd8c78bc52916b126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=BCsken?= Date: Wed, 20 Nov 2024 10:23:50 +0100 Subject: [PATCH] fix unit test for getting plugin data --- tests/PHPUnit/TestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/PHPUnit/TestCase.php b/tests/PHPUnit/TestCase.php index f8cb523d0..9e743085a 100644 --- a/tests/PHPUnit/TestCase.php +++ b/tests/PHPUnit/TestCase.php @@ -31,7 +31,8 @@ class TestCase extends \PHPUnit\Framework\TestCase when('wc_string_to_bool')->alias(function ($string) { return is_bool( $string ) ? $string : ( 'yes' === strtolower( $string ) || 1 === $string || 'true' === strtolower( $string ) || '1' === $string ); }); - when('get_file_data')->justReturn(['Version' => '1.0']); + when('get_file_data')->justReturn(['Version' => '1.0','PluginURI' => 'https://github.com/woocommerce/woocommerce-paypal-payments']); + when('get_plugin_data')->justReturn(['Version' => '1.0']); when('plugin_basename')->justReturn('woocommerce-paypal-payments/woocommerce-paypal-payments.php'); when('get_transient')->returnArg();