function test_is_coupon_used() { $coupon = new WPSC_Coupon(self::USE_ONCE_COUPON_ID); $this->assertTrue($coupon->is_active()); $this->assertTrue($coupon->is_use_once()); $this->assertFalse($coupon->is_used()); $coupon->used(); $this->assertTrue($coupon->is_used()); $this->assertFalse($coupon->is_active()); }