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

  • Home
  • SEARCH
  • 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 6972157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:55:55+00:00 2026-05-27T16:55:55+00:00

I have installed PHPUnit on Windows 7, with PHP and Pear. I have a

  • 0

I have installed PHPUnit on Windows 7, with PHP and Pear.

I have a basic test script, to start with:

<?php

class StackTest extends PHPUnit_Framework_TestCase
{
    public function testTest()
    {
        $this->assertTrue(false);
    }
}

I’m running it from the command prompt as:

phpunit unittest testTest.php

And getting the following return:

PHPUnit 3.6.5 by Sebastian Bergmann.

F

Time: 0 seconds, Memory: 2.75Mb

There was 1 failure:

1) StackTest::testTest
Failed asserting that false is true.

C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\Constraint.php:145
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\Constraint.php:92
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\Assert.php:2100
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\Assert.php:854
C:\Users\lbassett\Dropbox\Projects\Test\testTest.php:10
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestCase.php:939
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestCase.php:801
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestResult.php:649
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestCase.php:748
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestSuite.php:772
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\Framework\TestSuite.php:745
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\TextUI\TestRunner.php:325
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\TextUI\Command.php:187
C:\Program Files (x86)\PHP\PEAR\pear\PHPUnit\TextUI\Command.php:125
C:\Program Files (x86)\PHP\PEAR\phpunit:44

FAILURES!
Tests: 1, Assertions: 1, Failures: 1.

My problem is the long list of different files listed.

I only want to see my test scrip there. Am I missing something?

  • 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-27T16:55:55+00:00Added an answer on May 27, 2026 at 4:55 pm

    Short Version:

    It’s a bug in PHPUnit. I’ve fixed it. With the next minor release it will work.


    Long Version:

    You have already noticed that your file is included in the backtrace

     C:\Users\lbassett\Dropbox\Projects\Test\testTest.php:10
    

    so the question is why is there all that other stuff around your classes.

    PHPUnit should filter that backtrace and strip out all the PHPUnit classes but for some reasons that seems to not work.

    The output on linux:

    PHPUnit 3.6.5 by Sebastian Bergmann.
    
    F
    
    Time: 0 seconds, Memory: 3.00Mb
    
    There was 1 failure:
    
    1) failingTest::testFail
    Failed asserting that false is true.
    
    /home/edo/phpunit-dev/oneFailingTest/failingTest.php:6
    

    I at first was expecting an issue with the spaces in Program Files but I’ve installed it in a folder without spaces and it "breaks" there too.

    For me this is a bug in PHPUnit.

    I suggest you file an issue at the github issue tracker that the backtrace filtering seems broken on windows and I’ll see if I can take care of that then. Edit: I’ve pushed a fix. It should be solved in PHPUnit 3.6.6 (when it is released). See the edits.


    Edit: Yeah. The issue seems to come from PHPUnit_Util_Filter::phpunitFiles(); returning the paths with \ instead of /.

    Fix

    If you put the following code in: PHPUnit/Util/GlobalState.php at line 412. (Before the return statement)

    foreach(self::$phpunitFiles as $key => $value) {
        unset(self::$phpunitFiles[$key]);
        self::$phpunitFiles[str_replace("/", "\\", $key)] = $value;
    }
    

    then you get a nice looking backtrace. I’ll see to it that it gets fixed in 3.6.6 with a nicer patch.

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

Sidebar

Related Questions

I have installed php successfully on a Windows 7 machine but I can not
I have a very simple and classic installation: Windows 7 WampServer with PEAR (PHP
I have installed PHPUnit by the PHPUnit Manual, Chapter 3. Installing PHPUnit , pear
I have a MacBook Pro , installed PEAR , installed PHPUnit , so at
i have pear's phpunit installed (see image) I have that path in the include
I have PHPUnit and xdebug installed, and in my php.ini files for CLI I've
So I have manually installed PHPUnit by downloading the files from pear.phpunit.de and extracting
I have Selenium IDE/RC, and PHPUnit 3.5 (PEAR) installed, but I can't seem to
I have installed Xperf performance analyzer from Windows SDK and captured a trace as
I have installed W3C validator locally on Windows, following their instructions . I am

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.