Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7596567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:56:49+00:00 2026-05-30T21:56:49+00:00

<phpunit backupGlobals=false colors=true> <testsuite name=app1 > <directory>./app1</directory> </testsuite> <testsuite name=app1 > <directory>./app2</directory> </testsuite> </phpunit>

  • 0
<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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:56:50+00:00Added an answer on May 30, 2026 at 9:56 pm

    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, TestSuite classes 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 a App1_TestCase you inherit from.

    Should App1 really 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make PHPUnit respect __autoload functions? For example, I have these three
PHPunit can create a multitude of result reports, but I am having trouble figuring
I'm using PHPUnit but find it difficult to make it create good mocks and
PhpUnit::How can be __construct with protected variables tested? (not always we should add public
With PHPUnit I can successfully test if a specific call to a class properly
Using PHPUnit, I wonder how we can have multiple expectation from the same stub/mock.
The PHPUnit docs say that I can shove all my tests into a folder
As tested with phpunit: $xml_1 = new SimpleXMLElement('<name>Bugs</name>'); $xml_2 = new SimpleXMLElement('<name>Bugs</name>'); $this->assertEquals($xml_1, $xml_2);
In phpunit we can specify the method was called with particular ->with($this->equalTo('foobar')) or any
Using PHPUnit, I wonder if we can mock an object to test if a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.