mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
fix unit test for getting plugin data
This commit is contained in:
parent
8b2d7f2cf0
commit
5ebce7ad06
1 changed files with 2 additions and 1 deletions
|
@ -31,7 +31,8 @@ class TestCase extends \PHPUnit\Framework\TestCase
|
||||||
when('wc_string_to_bool')->alias(function ($string) {
|
when('wc_string_to_bool')->alias(function ($string) {
|
||||||
return is_bool( $string ) ? $string : ( 'yes' === strtolower( $string ) || 1 === $string || 'true' === strtolower( $string ) || '1' === $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('plugin_basename')->justReturn('woocommerce-paypal-payments/woocommerce-paypal-payments.php');
|
||||||
when('get_transient')->returnArg();
|
when('get_transient')->returnArg();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue