PayPal\Test\Functional\Api\BillingAgreementsFunctionalTest::testUpdate PHP Method

testUpdate() public method

public testUpdate ( $agreement )
$agreement Agreement
    public function testUpdate($agreement)
    {
        /** @var Patch[] $request */
        $request = $this->operation['request']['body'][0];
        $patch = new Patch();
        $patch->setOp($request['op']);
        $patch->setPath($request['path']);
        $patch->setValue($request['value']);
        $patches = array();
        $patches[] = $patch;
        $patchRequest = new PatchRequest();
        $patchRequest->setPatches($patches);
        $result = $agreement->update($patchRequest, $this->apiContext, $this->mockPayPalRestCall);
        $this->assertTrue($result);
    }