public function testResourceNotFoundError() { setApiKey(); try { $charge = \Conekta\Charge::find('1'); } catch (Exception $e) { $this->assertTrue(strpos(get_class($e), 'ResourceNotFoundError') !== false); } }
public function testSuccesfulFindCharge() { $pm = self::$valid_payment_method; $card = self::$valid_visa_card; setApiKey(); $cpm = \Conekta\Charge::create(array_merge($pm, $card)); $this->assertTrue($cpm->status == 'paid'); $pm = \Conekta\Charge::find($cpm->id); $this->assertTrue(strpos(get_class($pm), 'Charge') !== false); }