settlementDecline() public static method

settlement decline a transaction by id in sandbox
public static settlementDecline ( $transactionId ) : Transaction
return Transaction
 public function testSettlementDeclined()
 {
     $transaction = Braintree\Transaction::saleNoValidate(['amount' => '100.00', 'creditCard' => ['number' => '5105105105105100', 'expirationDate' => '05/12'], 'options' => ['submitForSettlement' => true]]);
     $transaction = Braintree\Test\Transaction::settlementDecline($transaction->id);
     $this->assertEquals('settlement_declined', $transaction->status);
 }
 public function testIncludeProcessorSettlementResponseForSettlementDeclinedTransaction()
 {
     $result = Braintree\Transaction::sale(["paymentMethodNonce" => Braintree\Test\Nonces::$paypalFuturePayment, "amount" => "100", "options" => ["submitForSettlement" => true]]);
     $this->assertTrue($result->success);
     $transaction = $result->transaction;
     Braintree\Test\Transaction::settlementDecline($transaction->id);
     $inline_transaction = Braintree\Transaction::find($transaction->id);
     $this->assertEquals($inline_transaction->status, Braintree\Transaction::SETTLEMENT_DECLINED);
     $this->assertEquals($inline_transaction->processorSettlementResponseCode, "4001");
     $this->assertEquals($inline_transaction->processorSettlementResponseText, "Settlement Declined");
 }