Ejemplo n.º 1
0
 /**
  * @dataProvider mockProvider
  * @param Agreement $obj
  */
 public function testExecute($obj, $mockApiContext)
 {
     $mockPayPalRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPayPalRestCall->expects($this->any())->method('execute')->will($this->returnValue(self::getJson()));
     $result = $obj->execute("123123", $mockApiContext, $mockPayPalRestCall);
     $this->assertNotNull($result);
 }
Ejemplo n.º 2
0
 /**
  * Execute agreement
  * @param $token
  * @return Agreement
  */
 function execute($token)
 {
     $agreement = new Agreement();
     return $agreement->execute($token, $this->getAdapter()->getApiContext());
 }