/**
  * @test
  */
 public function shouldMarkUnknownIfTransactionStatusNotSet()
 {
     $action = new AgreementDetailsStatusAction();
     $status = new GetBinaryStatus(array('agreementRef' => 'aRef'));
     //guard
     $status->markCaptured();
     $action->execute($status);
     $this->assertTrue($status->isUnknown());
 }
Example #2
0
 /**
  * @test
  */
 public function shouldNotMatchOthersThenCapturedStatus()
 {
     $statusRequest = new GetBinaryStatus(new \stdClass());
     $statusRequest->markCaptured();
     $this->assertTrue($statusRequest->isCaptured());
     $this->assertFalse($statusRequest->isCanceled());
     $this->assertFalse($statusRequest->isAuthorized());
     $this->assertFalse($statusRequest->isRefunded());
     $this->assertFalse($statusRequest->isSuspended());
     $this->assertFalse($statusRequest->isExpired());
     $this->assertFalse($statusRequest->isPending());
     $this->assertFalse($statusRequest->isFailed());
     $this->assertFalse($statusRequest->isNew());
     $this->assertFalse($statusRequest->isUnknown());
 }
Example #3
0
 /**
  * @test
  */
 public function shouldMarkUnknownIfStatusNotRecognized()
 {
     $request = new GetBinaryStatus([Constants::FIELD_STATUS => 'some-foo-bar-status']);
     $request->markCaptured();
     $action = new StatusAction();
     $action->execute($request);
     $this->assertTrue($request->isUnknown());
 }