Пример #1
0
 /**
  * @test
  * @codeCoverageIgnore
  * @depends createWebhookWithUrl
  * @depends getOneWebhook
  * @depends updateWebhook
  */
 public function deleteWebhook($model)
 {
     $this->_model->setId($model->getId());
     $result = $this->_service->delete($this->_model);
     $this->markTestIncomplete('Webhook does not return a empty array like the other resources. Returns Null instead!');
     $this->assertInternalType('array', $result, var_export($result, true));
 }
Пример #2
0
 /**
  * @test
  * @depends createSubscriptionWithoutOffer
  */
 public function completelyDeleteSubscription($model)
 {
     $this->_model->setId($model->getId())->setRemove(true);
     $result = $this->_service->delete($this->_model);
     $this->assertTrue($result->getIsCanceled(), var_export($result, true));
     $this->assertTrue($result->getIsDeleted(), var_export($result, true));
 }
Пример #3
0
 /**
  * @test
  * @codeCoverageIgnore
  * @depends createRefund
  * @depends getOneRefund
  * @depends updateRefund
  * @expectedException \Paymill\Services\PaymillException
  * @expectedExceptionMessage Method not Found
  */
 public function deleteRefund($model)
 {
     $this->_model->setId($model->getId());
     $result = $this->_service->delete($this->_model);
     $this->assertInstanceOf('Paymill\\Models\\Response\\Error', $result, var_export($result, true));
     $this->assertEquals('Method not Found', $result->getErrorMessage());
 }
Пример #4
0
 /**
  * @test
  * @codeCoverageIgnore
  * @expectedException \Paymill\Services\PaymillException
  * @expectedExceptionMessage 'PluginsAtPaymillDotde' is not a valid email address.
  */
 public function createClientWithInvalidEmail()
 {
     $this->_model->setEmail('PluginsAtPaymillDotde')->setDescription('Test');
     $result = $this->_service->create($this->_model);
     $this->assertInstanceOf('Paymill\\Models\\Response\\Client', $result);
     return $result;
 }
Пример #5
0
 /**
  * @test
  * @codeCoverageIgnore
  *
  *
  */
 public function deleteOfferWithoutSubscriptions()
 {
     $offer = $this->createOffer();
     $subscriptionResponse = $this->getRequestSubscription($offer);
     $subscriptionRequest = new Models\Request\Subscription();
     $subscriptionRequest->setId($subscriptionResponse->getId());
     $this->assertInstanceOf('Paymill\\Models\\Response\\Subscription', $subscriptionWithOffer = $this->_service->getOne($subscriptionRequest), var_export($subscriptionWithOffer, true));
     $this->_model->setRemoveWithSubscriptions(false)->setId($offer->getId());
     $result = $this->_service->delete($this->_model);
     $this->assertInternalType('array', $result, var_export($result, true));
     $subscriptionRequest->setId($subscriptionWithOffer->getId());
     $subscriptionResponse = $this->_service->getOne($subscriptionRequest);
     $this->assertFalse($subscriptionResponse->getIsCanceled());
     $this->assertFalse($subscriptionResponse->getIsDeleted());
 }
Пример #6
0
 /**
  * @test
  * @codeCoverageIgnore
  * @depends createPreauthorization
  * @depends getOnePreauthorization
  * @depends updatePreauthorization
  */
 public function deletePreauthorization($model)
 {
     $this->_model->setId($model->getId());
     $result = $this->_service->delete($this->_model);
     $this->assertInternalType('array', $result, var_export($result, true));
 }
Пример #7
0
 /**
  * @test
  * @codeCoverageIgnore
  * @depends createTransactionWithToken
  * @depends getOneTransaction
  * @depends updateTransaction
  * @expectedException \Paymill\Services\PaymillException
  * @expectedExceptionMessage Method not Found
  */
 public function deleteTransaction($model)
 {
     $this->_model->setId($model->getId());
     $this->_service->delete($this->_model);
 }
Пример #8
0
 /**
  * @test
  * @codeCoverageIgnore
  * @depends createPayment
  * @depends getOnePayment
  * @depends updatePayment
  */
 public function deletePayment($model)
 {
     $this->_model->setId($model->getId());
     $result = $this->_service->delete($this->_model);
     $this->assertEquals(null, $result, var_export($result, true));
 }
Пример #9
0
 /**
  * @test
  * @codeCoverageIgnore
  */
 public function createChecksum()
 {
     $result = $this->_service->getOne($this->_model);
     $this->assertInstanceOf('Paymill\\Models\\Response\\Checksum', $result, var_export($result, true));
     return $result;
 }