deploy() public method

Deploy a project.
public deploy ( integer $project_id ) : Deployment
$project_id integer
return app\models\Deployment
Beispiel #1
0
 public function test_Should_NotThrowWException_When_RollbackProcedureSucceeds()
 {
     try {
         $this->mockAuthGuard->shouldReceive('user')->andReturn(new App\Models\User());
         Auth::shouldReceive('guard')->andReturn($this->mockAuthGuard);
         $this->mockDeploymentForm->shouldReceive('save')->once()->andReturn(true);
         $this->mockProjectModel->shouldReceive('getLastDeployment');
         $this->mockProjectRepository->shouldReceive('byId')->andReturn($this->mockProjectModel);
         $jsonRpc = new JsonRpc($this->mockProjectRepository, $this->mockDeploymentForm);
         $jsonRpc->deploy(1);
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail($e->getMessage());
     }
 }