App\Services\Deployment\StorageDeployCommander::deploy PHP Method

deploy() public method

Give the command to deploy
public deploy ( mixed $deployment ) : boolean
$deployment mixed
return boolean
    public function deploy($deployment)
    {
        if (!Storage::put('deploy.json', $deployment)) {
            return false;
        } else {
            return true;
        }
    }

Usage Example

 public function test_Should_ReturnFalse_When_DeployCommandFails()
 {
     Storage::shouldReceive('put')->once()->andReturn(0);
     $deployCommander = new StorageDeployCommander();
     $result = $deployCommander->deploy(new App\Models\Deployment());
     $this->assertFalse($result, 'Expected deploy command to fail.');
 }
StorageDeployCommander