상속: extends PHPUnit_Framework_TestCase
예제 #1
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());
 }
예제 #2
0
파일: SaleTest.php 프로젝트: Roc4rdho/app
 /**
  * @dataProvider mockProvider
  * @param Sale $obj
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockPPRestCall = $this->getMockBuilder('\\PayPal\\Transport\\PayPalRestCall')->disableOriginalConstructor()->getMock();
     $mockPPRestCall->expects($this->any())->method('execute')->will($this->returnValue(SaleTest::getJson()));
     $result = $obj->get("saleId", $mockApiContext, $mockPPRestCall);
     $this->assertNotNull($result);
 }