Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / process / Tests / ProcessBuilderTest.php
index 3faa50c551c7044161d122433f95618d75726b38..cd0933f3263aa9682fa8fcb47e6ee208cd7d9147 100644 (file)
@@ -18,17 +18,11 @@ class ProcessBuilderTest extends TestCase
 {
     public function testInheritEnvironmentVars()
     {
-        $_ENV['MY_VAR_1'] = 'foo';
-
         $proc = ProcessBuilder::create()
             ->add('foo')
             ->getProcess();
 
-        unset($_ENV['MY_VAR_1']);
-
-        $env = $proc->getEnv();
-        $this->assertArrayHasKey('MY_VAR_1', $env);
-        $this->assertEquals('foo', $env['MY_VAR_1']);
+        $this->assertTrue($proc->areEnvironmentVariablesInherited());
     }
 
     public function testAddEnvironmentVariables()
@@ -47,22 +41,7 @@ class ProcessBuilderTest extends TestCase
         ;
 
         $this->assertSame($env, $proc->getEnv());
-    }
-
-    public function testProcessShouldInheritAndOverrideEnvironmentVars()
-    {
-        $_ENV['MY_VAR_1'] = 'foo';
-
-        $proc = ProcessBuilder::create()
-            ->setEnv('MY_VAR_1', 'bar')
-            ->add('foo')
-            ->getProcess();
-
-        unset($_ENV['MY_VAR_1']);
-
-        $env = $proc->getEnv();
-        $this->assertArrayHasKey('MY_VAR_1', $env);
-        $this->assertEquals('bar', $env['MY_VAR_1']);
+        $this->assertFalse($proc->areEnvironmentVariablesInherited());
     }
 
     /**
@@ -216,7 +195,7 @@ class ProcessBuilderTest extends TestCase
 
     /**
      * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException
-     * @expectedExceptionMessage Symfony\Component\Process\ProcessBuilder::setInput only accepts strings or stream resources.
+     * @expectedExceptionMessage Symfony\Component\Process\ProcessBuilder::setInput only accepts strings, Traversable objects or stream resources.
      */
     public function testInvalidInput()
     {