/** * @test */ public function shouldMarkFailedIfModelHasErrorSet() { $action = new StatusAction(); $model = array('error' => array('code' => 'foo')); $action->execute($status = new SimpleStatusRequest($model)); $this->assertTrue($status->isFailed()); }
/** * @test */ public function shouldNotMatchOthersThenSuspendedStatus() { $statusRequest = new SimpleStatusRequest(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()); }