Inheritance: extends PHPUnit_Framework_TestCase
 public function testCreate()
 {
     $request = $this->operation['request']['body'];
     $obj = new Payout($request);
     if (Setup::$mode != 'mock') {
         $obj->getSenderBatchHeader()->setSenderBatchId(uniqid());
     }
     PayoutsFunctionalTest::$batchId = $obj->getSenderBatchHeader()->getSenderBatchId();
     $params = array('sync_mode' => 'true');
     $result = $obj->create($params, null, $this->mockPayPalRestCall);
     $this->assertNotNull($result);
     $this->assertEquals(PayoutsFunctionalTest::$batchId, $result->getBatchHeader()->getSenderBatchHeader()->getSenderBatchId());
     return $result;
 }
Beispiel #2
0
 public function testCreate()
 {
     $request = $this->operation['request']['body'];
     $obj = new Payout($request);
     if (Setup::$mode != 'mock') {
         $obj->getSenderBatchHeader()->setSenderBatchId(uniqid());
     }
     PayoutsFunctionalTest::$batchId = $obj->getSenderBatchHeader()->getSenderBatchId();
     $params = array('sync_mode' => 'true');
     $result = $obj->create($params, $this->apiContext, $this->mockPayPalRestCall);
     $this->assertNotNull($result);
     $this->assertEquals(PayoutsFunctionalTest::$batchId, $result->getBatchHeader()->getSenderBatchHeader()->getSenderBatchId());
     $this->assertEquals('SUCCESS', $result->getBatchHeader()->getBatchStatus());
     $items = $result->getItems();
     $this->assertTrue(sizeof($items) > 0);
     $item = $items[0];
     $this->assertEquals('UNCLAIMED', $item->getTransactionStatus());
     return $result;
 }