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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:39:27+00:00 2026-05-31T11:39:27+00:00

I was following Jon´s screencast about Unit Testing with PhpUnit and ZF when I

  • 0

I was following Jon´s screencast about Unit Testing with PhpUnit and ZF when I got the exact same error that ratzip described in this question.

As he commented, I also had the same problem even after creating tests as suggested here: for some reason, there was some script looking for a file named as I named my test suite (MyApp.php or whatever…).

I looked around but wasn´t able to find where I should create this file and what it should contains.

But, in a given moment, after had read this question about how to run a specific phpunit xml testsuite, I decided to try to explicity insert a file in the testsuite section.

My phpunit.xml now is:

<phpunit bootstrap="./application/bootstrap.php" colors="true">
<testsuites>
    <testsuite name="MyApp">
        <file>./application/(path_to_model_inside_module)/ModelTests.php</file>
        <directory>./</directory>       
    </testsuite>
</testsuites>

<filter>

    <whitelist>
        <directory suffix=".php">../application/</directory>
        <exclude>
            <directory suffix=".phtml">../application/</directory>
        </exclude>
    </whitelist>

</filter>

And even if it seems a little despaired, that error is not happening anymore and the test is working now.

BUt I’m feeling unconfortable about it as I can’t understand what was the problem before and why this explicitation of a file “fixed” it.

I can’t figure why the xml directory definition wasn’t able to guide the testing framework to find the existing test.

  • 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-31T11:39:29+00:00Added an answer on May 31, 2026 at 11:39 am

    PHP Fatal error: Uncaught exception ‘PHPUnit_Framework_Exception’ with message
    ‘Neither “$TEST_SUITE_NAME.php” nor “$TEST_SUITE_NAME.php” could be
    opened.’ in …

    This is PHPUnits very cryptic way of saying

    He buddy! Small issue over here: I was trying to find some tests to execute but I didn’t find any so I tried to load a file named like the test suite and not even that exists. I can’t execute any tests.. can you help me out here? 🙁

    In short it is saying:

    After scanning the stuff in your xml I didn’t find any tests!

    Why does that happen in your case?

    PHPUnit looks for files ending in Test.php but your file ends in TestS.php. The extra “S” means PHPUnit will NOT pick up the file when scanning the directory. This is also why adding the file tag helps.

    Rename it do ModelTest.php and you can get rid of the file tag 🙂

    Or if you want to keep your filenames tell PHPUnit about your naming schema using:

      <directory suffix="Tests.php">./</directory>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this post Jon Skeet pointed out that the following code should be changed
I have the following code (thanks to input from 'jon Z' and 'manojlds') that
I took this from Jon Skeet's C# in depth. He mentioned the following is
Following from my last question which @Jon Skeet gave me a lot of help
Following this question: Good crash reporting library in c# Is there any library like
Following Izb's question about Best binary XML format for JavaME , I'm looking for
Following on from this question what would be the best way to write a
Following up on this question, I'm working on a large Delphi 7 codebase which
From Jon Skeet's blog: What does the following comment mean? // The line below
Jon Skeet has the following reputation tracker which is built by C#. 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.