コード例 #1
0
ファイル: StatusActionTest.php プロジェクト: Studio-40/Payum
 /**
  * @test
  */
 public function shouldMarkSuccessIfInvoiceNumberSet()
 {
     $action = new StatusAction();
     $action->execute($getStatus = new GetHumanStatus(array('invoice_number' => 'aNumber')));
     $this->assertTrue($getStatus->isSuccess());
 }
コード例 #2
0
ファイル: StatusActionTest.php プロジェクト: Studio-40/Payum
 /**
  * @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());
 }
コード例 #3
0
 /**
  * @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());
 }