Inheritance: extends PHPUnit_Framework_TestCase
Example #1
0
 /**
  * @dataProvider mockProvider
  * @param Order $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(OrderTest::getJson()));
     $result = $obj->get("orderId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }
 public static function createRelatedResources()
 {
     $relatedResources = new RelatedResources();
     $relatedResources->setAuthorization(AuthorizationTest::createAuthorization());
     $relatedResources->setCapture(CaptureTest::createCapture());
     $relatedResources->setOrder(OrderTest::createOrder());
     return $relatedResources;
 }
Example #3
0
 /**
  * @depends testSerializationDeserialization
  * @param RelatedResources $obj
  */
 public function testGetters($obj)
 {
     $this->assertEquals($obj->getSale(), SaleTest::getObject());
     $this->assertEquals($obj->getAuthorization(), AuthorizationTest::getObject());
     $this->assertEquals($obj->getOrder(), OrderTest::getObject());
     $this->assertEquals($obj->getCapture(), CaptureTest::getObject());
     $this->assertEquals($obj->getRefund(), RefundTest::getObject());
 }