<phpunit backupGlobals="false" colors="true">
<testsuite name="app1" >
<directory>./app1</directory>
</testsuite>
<testsuite name="app1" >
<directory>./app2</directory>
</testsuite>
</phpunit>
How can i make first and second testsuite load different bootstraps?
You can’t.
PHPUnit only allows you to specify one bootstrap file and you need to set up everything so that each test case of each testsuite could potentially be executed and PHPUnit has no how of running “setup” code for each testsuite from a bootstrap xml file.
When using the, with phpunit 3.6 discouraged,
TestSuiteclasses you could do it in those but my suggestion would be to just run all your generic bootstrap code in your bootstrap.php and should you need special setup for tests in app1 and in app2 to have aApp1_TestCaseyou inherit from.Should
App1really be a whole application I’d suggest having two separate projects with their own tests and setup code and not trying to run them in one phpunit run.