Przeglądaj źródła

[BrowserKit] fixed test insulation on Mac

Fabien Potencier 14 lat temu
rodzic
commit
1cec45c421
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      src/Symfony/Component/BrowserKit/Client.php

+ 2 - 1
src/Symfony/Component/BrowserKit/Client.php

@@ -286,7 +286,8 @@ abstract class Client
      */
     protected function doRequestInProcess($request)
     {
-        $process = new PhpProcess($this->getScript($request));
+        // We set the TMPDIR because on Macs, the temp directory changes based on the user.
+        $process = new PhpProcess($this->getScript($request), null, array('TMPDIR' => sys_get_temp_dir()));
         $process->run();
 
         if (!$process->isSuccessful() || !preg_match('/^O\:\d+\:/', $process->getOutput())) {