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 4257696
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:32:51+00:00 2026-05-21T05:32:51+00:00

I use PHPUnit 3.5.12, netbean 6.9, and git submodules in my project. So my

  • 0

I use PHPUnit 3.5.12, netbean 6.9, and git submodules in my project.

So my folder architecture looks like that:

lib/
lib/submodule1
lib/submodule1/src
lib/submodule1/tests
lib/submodule2
lib/submodule2/src
lib/submodule2/tests
src/
tests/

Considering that my main test folder (with phpunit_netbean.xml and bootstrap.php) is in the /tests/ folder; How can I be able to run the tests in /lib/*/tests/ too ?

I’ve look at testsuite, but I’m unable to get it working. So far I’ve tried the following configuration in my tests/phpunit_netbean.xml file:

<?xml version="1.0"?>
<phpunit
    bootstrap="./bootstrap.php"
    strict="true"
    stopOnError="false"
    stopOnFailure="false"
    stopOnIncomplete="false"
    stopOnSkipped="false"
    colors="false"
    verbose="true"
    >

    <testsuites>
        <testsuite name="modules">
            <directory>../lib/*</directory>
        </testsuite>
    </testsuites>

</phpunit>

And when I hit ALT+F6 in Netbean, I only have the tests from /tests that are run. Same thing with:

/tests$ phpunit -c phpunit_netbean.xml --testdox ./
enter code here

Also, I’ve tried this:

/tests$ phpunit -c phpunit_netbean.xml --testdox --loader modules ./
PHPUnit 3.5.12 by Sebastian Bergmann.

Could not use "modules" as loader.
  • 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-21T05:32:52+00:00Added an answer on May 21, 2026 at 5:32 am

    Have a look at the Appendix for your PHPUnit config file. You can tell PHPUnit which folders to include:

    <testsuites>
        <testsuite name="Submodules">
            <directory suffix="Test.php">../lib/*</directory>
        </testsuite>
    </testsuites>
    

    When you run this, PHPUnit should recursively iterate over all folders in lib and consider all files ending in Test.php as UnitTests. The name of the testsuite is irrelevant. To ease authoring of the XML file, consider using my phpunit-schema file.

    There is some additional information to this in the PHPUnit Manual Chapter: Composing a Test Suite Using the Filesystem . Netbeans has an input dialog in which you can specify the path to the phpUnit.xml and any custom TestSuite Class.

    Here is an example project: https://github.com/gooh/sample

    C:\Users\Gordon\Desktop\demo\tests>phpunit --testdox
    PHPUnit 3.5.13 by Sebastian Bergmann.
    
    A
     [x] One
    
    B
     [x] One
    
    My
     [x] One
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use phpUnit on a integration server to run all tests and if I
I use PHPUnit for unit tests, but when a fatal error is triggered, the
I'm trying to use PHPUnit to unit test some class methods that return SQL.
currently I'm using phpunit to write tests for some functions that access a mysql-database.
(please excuse that I didn't use aliases). I would like my query output to
We use a data acquisition card to take readings from a device that increases
For example I use Netbeans for PHP and have started to integrate PHPUnit &
I've just started to use PHPUnit, but I've run into a bit of a
I am trying to work out how to configure PHPUnit to use the test
I have been trying to use PHPUnit to test an application. I have it

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.