woocommerce /
woocommerce-gateway-stripe
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | $_tests_dir = getenv( 'WP_TESTS_DIR' ); |
||
| 4 | if ( ! $_tests_dir ) { |
||
| 5 | $_tests_dir = '/tmp/wordpress-tests-lib'; |
||
| 6 | } |
||
| 7 | |||
| 8 | require_once $_tests_dir . '/includes/functions.php'; |
||
| 9 | |||
| 10 | function _manually_load_plugin() { |
||
| 11 | $plugin_dir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/'; |
||
| 12 | require $plugin_dir . 'woocommerce-gateway-stripe/woocommerce-gateway-stripe.php'; |
||
| 13 | require $plugin_dir . 'woocommerce/woocommerce.php'; |
||
| 14 | } |
||
| 15 | |||
| 16 | function is_woocommerce_active() { |
||
| 17 | return true; |
||
| 18 | } |
||
| 19 | |||
| 20 | function woothemes_queue_update( $file, $file_id, $product_id ) { |
||
|
0 ignored issues
–
show
|
|||
| 21 | return true; |
||
| 22 | } |
||
| 23 | |||
| 24 | tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); |
||
| 25 | |||
| 26 | require $_tests_dir . '/includes/bootstrap.php'; |
||
| 27 | |||
| 28 | $wc_tests_framework_base_dir = dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/woocommerce/tests/framework/'; |
||
| 29 | require_once( $wc_tests_framework_base_dir . 'class-wc-mock-session-handler.php' ); |
||
| 30 | require_once( $wc_tests_framework_base_dir . 'class-wc-unit-test-case.php' ); |
||
| 31 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-product.php' ); |
||
| 32 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-coupon.php' ); |
||
| 33 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-fee.php' ); |
||
| 34 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-shipping.php' ); |
||
| 35 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-customer.php' ); |
||
| 36 | require_once( $wc_tests_framework_base_dir . 'helpers/class-wc-helper-order.php' ); |
||
| 37 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.