/**
  * @test
  *
  * @param string $name
  * @param bool $expected
  * @dataProvider provideExecutableNames
  */
 public function isExecutableName($name, $expected)
 {
     if (!OperatingSystem::isWindows()) {
         $this->markTestSkipped('Only tested on windows');
     }
     $this->assertSame($expected, WindowsSystem::isExecutableName($name), $name);
 }
 /**
  * @param string $program
  * @return bool
  */
 public static function isProgramInstalled($program)
 {
     if (self::isWindows()) {
         return WindowsSystem::isProgramInstalled($program);
     }
     $out = null;
     $return = null;
     @exec('which ' . $program, $out, $return);
     return $return === 0;
 }
Example #3
0
 /**
  * @test
  *
  * @param string $name
  * @param bool $expected
  * @dataProvider provideExecutableNames
  */
 public function isExecutableName($name, $expected)
 {
     $this->assertSame($expected, WindowsSystem::isExecutableName($name), $name);
 }