Пример #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
 /**
  * Tests the getters and setters of the model
  * @test
  */
 public function setGetTest()
 {
     $sample = array('url' => 'your-webhook-url', 'email' => 'your-webhook-email', 'event_types' => array('transaction.succeeded', 'subscription.created'), 'state' => true);
     $this->_webhook->setUrl($sample['url'])->setEmail($sample['email'])->setEventTypes($sample['event_types'])->setActive($sample['state']);
     $this->assertEquals($this->_webhook->getUrl(), $sample['url']);
     $this->assertEquals($this->_webhook->getEmail(), $sample['email']);
     $this->assertEquals($this->_webhook->getEventTypes(), $sample['event_types']);
     $this->assertEquals($this->_webhook->getActive(), $sample['state']);
     return $this->_webhook;
 }
Пример #3
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->assertInternalType('array', $result, var_export($result, true));
 }