class ProcessUtilsTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Tests/ProcessUtilsTest.php \Symfony\Component\Process\Tests\ProcessUtilsTest
Hierarchy
- class \Symfony\Component\Process\Tests\ProcessUtilsTest extends \Symfony\Component\Process\Tests\PHPUnit_Framework_TestCase
Expanded class hierarchy of ProcessUtilsTest
File
- vendor/
symfony/ process/ Tests/ ProcessUtilsTest.php, line 16
Namespace
Symfony\Component\Process\TestsView source
class ProcessUtilsTest extends \PHPUnit_Framework_TestCase {
/**
* @dataProvider dataArguments
*/
public function testEscapeArgument($result, $argument) {
$this
->assertSame($result, ProcessUtils::escapeArgument($argument));
}
public function dataArguments() {
if ('\\' === DIRECTORY_SEPARATOR) {
return array(
array(
'"\\"php\\" \\"-v\\""',
'"php" "-v"',
),
array(
'"foo bar"',
'foo bar',
),
array(
'^%"path"^%',
'%path%',
),
array(
'"<|>\\" \\"\'f"',
'<|>" "\'f',
),
array(
'""',
'',
),
array(
'"with\\trailingbs\\\\"',
'with\\trailingbs\\',
),
);
}
return array(
array(
"'\"php\" \"-v\"'",
'"php" "-v"',
),
array(
"'foo bar'",
'foo bar',
),
array(
"'%path%'",
'%path%',
),
array(
"'<|>\" \"'\\''f'",
'<|>" "\'f',
),
array(
"''",
'',
),
array(
"'with\\trailingbs\\'",
'with\\trailingbs\\',
),
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ProcessUtilsTest:: |
public | function | ||
ProcessUtilsTest:: |
public | function | @dataProvider dataArguments |