私がしたことは、リスナーを持つことでした。
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="./phpunit_bootstrap.php"
backupGlobals="false"
backupStaticAttributes="false"
verbose="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true">
<testsuites>
<testsuite name="unit">
<directory>./unit/</directory>
</testsuite>
<testsuite name="integration">
<directory>./integration/</directory>
</testsuite>
</testsuites>
<listeners>
<listener class="tests\base\TestListener" file="./base/TestListener.php"></listener>
</listeners>
</phpunit>
その後TestListener.php
class TestListener extends \PHPUnit_Framework_BaseTestListener
{
public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
{
if (strpos($suite->getName(),"integration") !== false) {
// Bootstrap integration tests
} else {
// Bootstrap unit tests
}
}
}
あなたが必要とする10種類のブートストラップファイルを持っているので、私は、これは良いアイデアだとは思いません、あなたのソリューションに基づいて、10のphpunitblabla.xmlファイルを作成する – smarber