Beispiel #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));
 }
 /**
  * @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));
 }
Beispiel #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());
 }
Beispiel #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;
 }
Beispiel #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());
 }
 /**
  * @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));
 }
 /**
  * @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);
 }
Beispiel #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));
 }
 /**
  * @test
  * @codeCoverageIgnore
  */
 public function createChecksum()
 {
     $result = $this->_service->getOne($this->_model);
     $this->assertInstanceOf('Paymill\\Models\\Response\\Checksum', $result, var_export($result, true));
     return $result;
 }