示例#1
0
 function testCapture()
 {
     $collection = $this->getMock('\\RESTful\\Collection', array('create'), array('\\Balanced\\Debit', 'some/uri', null));
     $collection->expects($this->once())->method('create')->with(array('hold_uri' => 'some/hold/uri', 'amount' => 2211));
     $account = new Account(array('debits' => $collection));
     $hold = new Hold(array('uri' => 'some/hold/uri', 'account' => $account));
     $hold->capture(2211);
 }