public function StringInputTest::testToString in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/console/Tests/Input/StringInputTest.php \Symfony\Component\Console\Tests\Input\StringInputTest::testToString()
File
- vendor/
symfony/ console/ Tests/ Input/ StringInputTest.php, line 88
Class
Namespace
Symfony\Component\Console\Tests\InputCode
public function testToString() {
$input = new StringInput('-f foo');
$this
->assertEquals('-f foo', (string) $input);
$input = new StringInput('-f --bar=foo "a b c d"');
$this
->assertEquals('-f --bar=foo ' . escapeshellarg('a b c d'), (string) $input);
$input = new StringInput('-f --bar=foo \'a b c d\' ' . "'A\nB\\'C'");
$this
->assertEquals('-f --bar=foo ' . escapeshellarg('a b c d') . ' ' . escapeshellarg("A\nB'C"), (string) $input);
}