Example #1
0
 public function testGetEnv()
 {
     $status = Machine::status('default');
     if ($status == Machine::RUNNING) {
         Machine::stop('default');
     }
     try {
         Machine::getEnv('default');
         $this->fail('Docker machine is not running, expected exception');
     } catch (\Exception $e) {
         Machine::start('default');
         $env = Machine::getEnv('default');
         $this->assertNotEmpty($env);
     }
 }
 /**
  * @return bool
  */
 protected function envExported()
 {
     return (bool) (!empty($this->dockerParams)) || Machine::isExported();
 }