Platformsh\Cli\Helper\GitHelper::ensureInstalled PHP Method

ensureInstalled() public method

Ensure that the Git CLI is installed.
public ensureInstalled ( )
    public function ensureInstalled()
    {
        if (!$this->shellHelper->commandExists('git')) {
            throw new DependencyMissingException('Git must be installed');
        }
    }

Usage Example

 /**
  * Test GitHelper::ensureInstalled().
  */
 public function testEnsureInstalled()
 {
     try {
         $this->gitHelper->ensureInstalled();
     } catch (\Exception $e) {
         $this->fail();
     }
 }
All Usage Examples Of Platformsh\Cli\Helper\GitHelper::ensureInstalled