/** * @test * @codeCoverageIgnore * @depends createOffer */ public function updateOffer($model) { $this->_model->setId($model->getId())->setName('NewName'); $result = $this->_service->update($this->_model); $this->assertInstanceOf('Paymill\\Models\\Response\\Offer', $result, var_export($result, true)); $this->assertEquals($model->getId(), $result->getId()); }
/** * @test * @codeCoverageIgnore * @depends createWebhookWithUrl */ public function updateWebhook($model) { $this->_model->setId($model->getId())->setActive(false)->setUrl('http://example.com/dummyCallbackUpdate'); $result = $this->_service->update($this->_model); $this->assertInstanceOf('Paymill\\Models\\Response\\Webhook', $result, var_export($result, true)); $this->assertEquals($model->getId(), $result->getId()); $this->assertFalse($result->getActive()); }
/** * @test * @codeCoverageIgnore * @depends createPreauthorization */ public function updatePreauthorization($model) { $this->_model->setId($model->getId()); $this->markTestIncomplete('Preauthorization should return a valid Object like Client "Method not found". Returns a empty 500-Response instead.'); $result = $this->_service->update($this->_model); $this->assertInstanceOf('Paymill\\Models\\Response\\Error', $result, var_export($result, true)); $this->assertEquals('Preauthorization was not found', $result->getErrorMessage()); }
/** * @test * @codeCoverageIgnore * @depends createSubscriptionWithOffer */ public function unPauseSubscription($model) { $this->_model->setId($model->getId()); $this->_model->setPause(false); $result = $this->_service->update($this->_model); $this->assertInstanceOf('Paymill\\Models\\Response\\Subscription', $result, var_export($result, true)); $this->assertEquals('active', $result->getStatus()); }
/** * @test * @codeCoverageIgnore * @expectedException \Paymill\Services\PaymillException * @expectedExceptionMessage Transaction not found */ public function updateTransactionWithWrongId() { $this->_model->setId('YouWillNeverFindMe404')->setDescription('TEST'); $this->_service->update($this->_model); }
/** * @test * @codeCoverageIgnore * @depends createPayment * @expectedException \Paymill\Services\PaymillException * @expectedExceptionMessage Method not Found */ public function updatePayment($model) { $this->_model->setId($model->getId()); $this->_service->update($this->_model); }