You appear to be a bot. Output may be restricted
Description
Usage
Tests_Payment_Class::test_failed_payment_discount();
Parameters
Returns
void
Source
File name: easy-digital-downloads/tests/tests-payment-class.php
Lines:
1 to 23 of 23
public function test_failed_payment_discount() { $id = EDD_Helper_Discount::create_simple_percent_discount(); $uses = edd_get_discount_uses( $id ); $payment = edd_get_payment( $this->_payment_id ); $payment->discounts = array( '20OFF' ); $payment->save(); $payment->status = 'complete'; $payment->save(); $new_complete = edd_get_discount_uses( $id ); $this->assertEquals( $uses + 1, $new_complete ); $payment->status = 'failed'; $payment->save(); $new_failed = edd_get_discount_uses( $id ); $this->assertEquals( $uses, $new_failed ); }