ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
ProcessUtilsTest.php
Go to the documentation of this file.
1
<?
php
2
3
/*
4
* This file is part of the Symfony package.
5
*
6
* (c) Fabien Potencier <fabien@symfony.com>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
Symfony\Component\Process\Tests
;
13
14
use
Symfony\Component\Process\ProcessUtils
;
15
16
class
ProcessUtilsTest
extends
\PHPUnit_Framework_TestCase
17
{
21
public
function
testEscapeArgument
(
$result
, $argument)
22
{
23
$this->assertSame(
$result
,
ProcessUtils::escapeArgument
($argument));
24
}
25
26
public
function
dataArguments
()
27
{
28
if
(
'\\'
=== DIRECTORY_SEPARATOR) {
29
return
array
(
30
array
(
'"\"php\" \"-v\""'
,
'"php" "-v"'
),
31
array
(
'"foo bar"'
,
'foo bar'
),
32
array
(
'^%"path"^%'
,
'%path%'
),
33
array
(
'"<|>\\" \\"\'f"'
,
'<|>" "\'f'
),
34
array
(
'""'
,
''
),
35
array
(
'"with\trailingbs\\\\"'
,
'with\trailingbs\\'
),
36
);
37
}
38
39
return
array
(
40
array
(
"'\"php\" \"-v\"'"
,
'"php" "-v"'
),
41
array
(
"'foo bar'"
,
'foo bar'
),
42
array
(
"'%path%'"
,
'%path%'
),
43
array
(
"'<|>\" \"'\\''f'"
,
'<|>" "\'f'
),
44
array
(
"''"
,
''
),
45
array
(
"'with\\trailingbs\\'"
,
'with\trailingbs\\'
),
46
);
47
}
48
}
$result
$result
Definition:
CleanUpTest.php:407
ProcessUtils
Symfony\Component\Process\Tests\ProcessUtilsTest\testEscapeArgument
testEscapeArgument($result, $argument)
dataArguments
Definition:
ProcessUtilsTest.php:21
PHPUnit_Framework_TestCase
Symfony\Component\Process\Tests\ProcessUtilsTest
Definition:
ProcessUtilsTest.php:16
Symfony\Component\Process\Tests\ProcessUtilsTest\dataArguments
dataArguments()
Definition:
ProcessUtilsTest.php:26
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
Symfony\Component\Process\ProcessUtils\escapeArgument
static escapeArgument($argument)
Escapes a string to be used as a shell argument.
Definition:
ProcessUtils.php:39
php
Symfony\Component\Process\Tests
Definition:
ExecutableFinderTest.php:12
libs
composer
vendor
symfony
process
Tests
ProcessUtilsTest.php
Generated on Fri Jan 24 2025 19:00:53 for ILIAS by
1.8.13 (using
Doxyfile
)