Exemplo n.º 1
0
 /**
  * @return void
  * @param string $name
  * @param string $path
  */
 protected function createScriptFile($name, $path)
 {
     $source = \Nano\Cli::isWindows() ? $this->getWindowsScriptSource() : $this->getUnixScriptSource();
     $fileName = $path . DIRECTORY_SEPARATOR . $name;
     if (\Nano\Cli::isWindows()) {
         $fileName .= '.bat';
     }
     file_put_contents($fileName, $source);
     chMod($fileName, 0755);
 }
Exemplo n.º 2
0
 public function testIsWindows()
 {
     self::assertEquals('\\' == DIRECTORY_SEPARATOR, \Nano\Cli::isWindows());
 }