PhpUnit引导参数

PhpUnit引导参数,php,phpunit,Php,Phpunit,我有一个phpunit.xml,它定义了要测试的测试以及引导文件的位置。 我还想在phpunit.xml中定义可以在引导过程中访问的参数 以下是我的phpunit.xml: <phpunit bootstrap="./bootstrap.php" colors="true" bootstrapArg="abcdefgh"> <testsuite name="TestSuite"> <file>./Test1.php</file&

我有一个phpunit.xml,它定义了要测试的测试以及引导文件的位置。 我还想在phpunit.xml中定义可以在引导过程中访问的参数

以下是我的phpunit.xml:

<phpunit bootstrap="./bootstrap.php" colors="true" bootstrapArg="abcdefgh">
    <testsuite name="TestSuite">

        <file>./Test1.php</file>
        <file>./Test2.php</file>

</testsuite></phpunit>

/Test1.php
/Test2.php
我想在bootstrap.php中访问“bootstrapArg”的值。这可能吗


谢谢

配置可以包含一个
部分,遵循以下规则:

您可以在引导过程中访问这些变量

<php>
  <includePath>.</includePath>
  <ini name="foo" value="bar"/>
  <const name="foo" value="bar"/>
  <var name="foo" value="bar"/>
  <env name="foo" value="bar"/>
  <post name="foo" value="bar"/>
  <get name="foo" value="bar"/>
  <cookie name="foo" value="bar"/>
  <server name="foo" value="bar"/>
  <files name="foo" value="bar"/>
  <request name="foo" value="bar"/>
</php>
ini_set('foo', 'bar');
define('foo', 'bar');
$GLOBALS['foo'] = 'bar';
$_ENV['foo'] = 'bar';
$_POST['foo'] = 'bar';
$_GET['foo'] = 'bar';
$_COOKIE['foo'] = 'bar';
$_SERVER['foo'] = 'bar';
$_FILES['foo'] = 'bar';
$_REQUEST['foo'] = 'bar';