/** * @test */ public function shouldMarkFailedEvenIfStatusCreatedAndErrorCodeSet() { $action = new StatusAction(); $status = new GetBinaryStatus(array('error_code' => 'aCode', 'status' => Constants::STATUS_CREATED)); //guard $status->markUnknown(); $action->execute($status); $this->assertTrue($status->isFailed()); }
/** * @test */ public function shouldMarkSuccessIfStatusCreated() { $action = new StatusAction(); $status = new GetBinaryStatus(array('status' => Constants::STATUS_CREATED)); //guard $status->markUnknown(); $action->execute($status); $this->assertTrue($status->isSuccess()); }