10000 minor #28864 [Process] A test case for stringifying of Process argume… · dunglas/symfony@55978d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 55978d7

minor symfony#28864 [Process] A test case for stringifying of Process arguments (vudaltsov)
This PR was merged into the 3.4 branch. Discussion ---------- [Process] A test case for stringifying of Process arguments | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | for symfony#28863 | License | MIT | Doc PR | Checks that non-string arguments passed to Process constructor are typecasted to string Commits ------- 0d54342 Add a test case for stringifying of Process arguments
2 parents 7e16a0d + 0d54342 commit 55978d7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Symfony/Component/Process/Tests/ProcessTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ public function testEscapeArgument($arg)
14921492
$p = new Process(array(self::$phpBin, '-r', 'echo $argv[1];', $arg));
14931493
$p->run();
14941494

1495-
$this->assertSame($arg, $p->getOutput());
1495+
$this->assertSame((string) $arg, $p->getOutput());
14961496
}
14971497

14981498
/**
@@ -1505,7 +1505,7 @@ public function testEscapeArgumentWhenInheritEnvDisabled($arg)
15051505
$p->inheritEnvironmentVariables(false);
15061506
$p->run();
15071507

1508-
$this->assertSame($arg, $p->getOutput());
1508+
$this->assertSame((string) $arg, $p->getOutput());
15091509
}
15101510

15111511
public function testRawCommandLine()
@@ -1535,6 +1535,9 @@ public function provideEscapeArgument()
15351535
yield array("a!b\tc");
15361536
yield array('a\\\\"\\"');
15371537
yield array('éÉèÈàÀöä');
1538+
yield array(null);
1539+
yield array(1);
1540+
yield array(1.1);
15381541
}
15391542

15401543
public function testEnvArgument()

0 commit comments

Comments
 (0)
0