/** * @depends testSerializationDeserialization * @param Agreement $obj */ public function testGetters($obj) { $this->assertEquals($obj->getId(), "TestSample"); $this->assertEquals($obj->getState(), "TestSample"); $this->assertEquals($obj->getName(), "TestSample"); $this->assertEquals($obj->getDescription(), "TestSample"); $this->assertEquals($obj->getStartDate(), "TestSample"); $this->assertEquals($obj->getPayer(), PayerTest::getObject()); $this->assertEquals($obj->getShippingAddress(), AddressTest::getObject()); $this->assertEquals($obj->getOverrideMerchantPreferences(), MerchantPreferencesTest::getObject()); $this->assertEquals($obj->getOverrideChargeModels(), OverrideChargeModelTest::getObject()); $this->assertEquals($obj->getPlan(), PlanTest::getObject()); $this->assertEquals($obj->getCreateTime(), "TestSample"); $this->assertEquals($obj->getUpdateTime(), "TestSample"); $this->assertEquals($obj->getLinks(), LinksTest::getObject()); }
/** * @return Agreement */ public function testCreateCCAgreement() { $plan = BillingPlansFunctionalTest::getPlan(); $request = $this->operation['request']['body']; $agreement = new Agreement($request); // Update the Schema to use a working Plan $agreement->getPlan()->setId($plan->getId()); $result = $agreement->create($this->apiContext, $this->mockPayPalRestCall); $this->assertNotNull($result); return $result; }