/** * @test */ public function shouldMarkSuccessIfInvoiceNumberSet() { $action = new StatusAction(); $action->execute($getStatus = new GetHumanStatus(array('invoice_number' => 'aNumber'))); $this->assertTrue($getStatus->isSuccess()); }
/** * @test */ public function shouldMarkSuccessIfModelHasSuccefullyUsedTokenSet() { $action = new StatusAction(); $model = array('card' => array('foo'), 'captured' => true, 'paid' => true); $action->execute($status = new GetHumanStatus($model)); $this->assertTrue($status->isSuccess()); }
/** * @test */ public function shouldNotMatchOthersThenSuspendedStatus() { $statusRequest = new GetHumanStatus(new \stdClass()); $statusRequest->markSuspended(); $this->assertTrue($statusRequest->isSuspended()); $this->assertFalse($statusRequest->isSuccess()); $this->assertFalse($statusRequest->isExpired()); $this->assertFalse($statusRequest->isCanceled()); $this->assertFalse($statusRequest->isPending()); $this->assertFalse($statusRequest->isFailed()); $this->assertFalse($statusRequest->isNew()); $this->assertFalse($statusRequest->isUnknown()); }