示例#1
0
 public function testDeleteException()
 {
     $exception = new \Braintree_Exception();
     $cardToken = 1;
     $this->braintreeCreditCardMock->expects($this->once())->method('delete')->with($cardToken)->willThrowException($exception);
     $this->loggerMock->expects($this->once())->method('critical')->with($exception);
     $return = $this->model->deleteCard($cardToken);
     $this->assertEquals(false, $return);
 }