digitalkaoz 14 лет назад
Родитель
Сommit
5305454cc1

+ 2 - 2
src/Symfony/Component/Process/PhpExecutableFinder.php

@@ -42,14 +42,14 @@ class PhpExecutableFinder
 
             return $php;
         }
-        
+
         $suffixes = DIRECTORY_SEPARATOR == '\\' ? (getenv('PATHEXT') ? explode(PATH_SEPARATOR, getenv('PATHEXT')) : array('.exe', '.bat', '.cmd', '.com')) : array('');
         foreach ($suffixes as $suffix) {
             if (is_executable($php = PHP_BINDIR.DIRECTORY_SEPARATOR.'php'.$suffix)) {
                 return $php;
             }
         }
-        
+
         if ($php = getenv('PHP_PEAR_PHP_BIN')) {
             if (is_executable($php)) {
                 return $php;

+ 5 - 5
tests/Symfony/Tests/Component/Process/PhpExecutableFinderTest.php

@@ -29,11 +29,11 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
         
         //not executable PHP_PATH
         putenv('PHP_PATH=/not/executable/php');
-        $this->assertFalse($f->find(),'::find() returns false for not executable php');
+        $this->assertFalse($f->find(), '::find() returns false for not executable php');
         
         //executable PHP_PATH
         putenv('PHP_PATH='.$current); 
-        $this->assertEquals($f->find(),$current,'::find() returns the executable php');
+        $this->assertEquals($f->find(), $current, '::find() returns the executable php');
     }
 
     /**
@@ -48,7 +48,7 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
         $current = $f->find();
         
         //TODO maybe php executable is custom or even windows
-        $this->assertEquals($f->find(),PHP_BINDIR.DIRECTORY_SEPARATOR.'php','::find() returns the executable php with suffixes');
+        $this->assertEquals($f->find(), PHP_BINDIR.DIRECTORY_SEPARATOR.'php', '::find() returns the executable php with suffixes');
     }
     
     /**
@@ -67,10 +67,10 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase
         
         //not executable PHP_PEAR_PHP_BIN
         putenv('PHP_PEAR_PHP_BIN=/not/executable/php');
-        $this->assertFalse($f->find(),'::find() returns false for not executable php');
+        $this->assertFalse($f->find(), '::find() returns false for not executable php');
         
         //executable PHP_PEAR_PHP_BIN
         putenv('PHP_PEAR_PHP_BIN='.$current); 
-        $this->assertEquals($f->find(),$current,'::find() returns the executable php');
+        $this->assertEquals($f->find(), $current, '::find() returns the executable php');
     }
 }

+ 3 - 4
tests/Symfony/Tests/Component/Process/ProcessTest.php

@@ -40,9 +40,9 @@ class ProcessTest extends \PHPUnit_Framework_TestCase
      * 
      * @dataProvider codeProvider
      */
-    public function testProcessResponses($expected,$getter,$code)
+    public function testProcessResponses($expected, $getter, $code)
     {
-        $p = new Process(sprintf('php -r "%s"',$code));
+        $p = new Process(sprintf('php -r "%s"', $code));
         $p->run();
         
         $this->assertSame($expected, $p->$getter());
@@ -54,7 +54,7 @@ class ProcessTest extends \PHPUnit_Framework_TestCase
             //expected output / getter / code to execute
             //array(1,'getExitCode','exit(1);'),
             //array(true,'isSuccessful','exit();'),
-            array('output','getOutput','echo \"output\";'),
+            array('output', 'getOutput', 'echo \"output\";'),
         );
     }
     
@@ -74,5 +74,4 @@ class ProcessTest extends \PHPUnit_Framework_TestCase
         
         return $defaults;
     }
-
 }