/** @depends test_it_can_get_a_single_payment */ function test_it_can_cancel_payments(Payment $payment) { $payment = $this->api->cancelPayment($payment->getId()); $this->assertTrue($payment->isCancelled()); return $payment; }