/** * Tests Services_Paymill_Subscriptions->create() */ public function testCreateWithToken() { $params = array('name' => 'Test subscription', 'amount' => '333', 'interval' => 'year', 'trial_period_days' => '3', 'currency' => 'eur'); $offer = $this->_offers->create($params); $item = $this->_subscriptions->create(array('offer' => $offer['id'], 'token' => TOKEN)); $this->assertArrayHasKey('id', $item); return $item['id']; }
/** * Tests Services_Paymill_Offers->delete() * @depends testUpdate */ public function testDelete($offerId) { $offer = $this->_offers->delete($offerId); $this->assertInternalType('array', $offer); $this->assertCount(0, $offer); }