PayPal\Test\Functional\Api\BillingAgreementsFunctionalTest::testCancel PHP Метод

testCancel() публичный Метод

public testCancel ( $agreement ) : PayPal\Api\Agreement
$agreement Agreement
Результат PayPal\Api\Agreement
    public function testCancel($agreement)
    {
        $agreementStateDescriptor = new AgreementStateDescriptor($this->operation['request']['body']);
        $result = $agreement->cancel($agreementStateDescriptor, $this->apiContext, $this->mockPayPalRestCall);
        $this->assertTrue($result);
        $this->setupTest($this->getClassName(), 'testGetCancelled');
        $get = $this->testGet($agreement);
        $this->assertEquals('Cancelled', $get->getState());
        return $get;
    }