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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:23:51+00:00 2026-06-10T06:23:51+00:00

In a directory I have two files oneTest.php <?php class oneTest extends PHPUnit_Framework_TestCase {

  • 0

In a directory I have two files

oneTest.php

<?php

class oneTest extends PHPUnit_Framework_TestCase {

    public function testSomethingOne()
    {
        echo 'ONE TEST';
        $this->assertEquals(1, 1);
    }

}

twoTest.php

<?php

class twoTest extends PHPUnit_Framework_TestCase {

    public function testSomethingTwo()
    {
        echo 'TWO TEST';
        $this->assertEquals(2, 2);
    }

}

From within the directory I can run both tests fine

phpunit oneTest.php
phpunit twoTest.php

And I get the expected output on both.

If I try and run all tests with

phpunit *

It only runs the first test.

I’m running phpunit 3.6.12 on Ubuntu 12.04.

Any ideas why this is happening?

Thanks

  • 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-06-10T06:23:53+00:00Added an answer on June 10, 2026 at 6:23 am

    This is simply a limitation of phpunit, it is not programmed to support multiple files on the command line. You can, however, pass a directory name to phpunit. If you want to run the tests in the current directory, use

    phpunit .
    

    Edit: alternatively, you can specify a testsuite in a XML configuration file.

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

Sidebar

Related Questions

I have two php files in the same directory: test.tattler.php class.tattler_stats.php My test.tattler is
When I have two sql-files, one of them in a sub-directory main_test.sql sub/sub_test.sql and
I have two directories with hundreds of PHP files in each. The second directory
I have a class that updates two .plist files in the app documents directory
I have two Java class files: primegen and primecheck sitting in the same directory.
I have two XML files located in res/xml/. One file is a normal XML
I'm working on an NSIS script in which I have two directory pages. One
What I have going on is two files, one file contains: Orange Apple The
I have two java files in a directory, neither of them are in a
Now I have two directory, all of header files *.h are included in directory

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.