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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:33:09+00:00 2026-06-06T23:33:09+00:00

I am trying very hard to get phpunit working in netbeans with my symfony2

  • 0

I am trying very hard to get phpunit working in netbeans with my symfony2 project.

I’ve made sub folder test in my project root. Tried linked the project to the phpunit.xml.dist and to the bootstrap.php.cash. and made a MyProjectTestSuite.php in that test folder and put that in my project property’s as wel.

but all this gets me the error:

PHP Fatal error:  Uncaught exception 'PHPUnit_Framework_Exception' with message 'Could not find class "" in "C:\Program Files\NetBeans 7.1.2\php\phpunit\NetBeansSuite.php".' in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php:125
Stack trace:
#0 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test->__construct('', 'C:\Program File...')
#1 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#2 C:\xampp\php\phpunit(53): PHPUnit_TextUI_Command::main()
#3 {main}
  thrown in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php on line 125

Fatal error: Uncaught exception 'PHPUnit_Framework_Exception' with message 'Could not find class "" in "C:\Program Files\NetBeans 7.1.2\php\phpunit\NetBeansSuite.php".' in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php:125
Stack trace:
#0 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(157): PHPUnit_Util_Skeleton_Test->__construct('', 'C:\Program File...')
#1 C:\xampp\php\PEAR\PHPUnit\TextUI\Command.php(129): PHPUnit_TextUI_Command->run(Array, true)
#2 C:\xampp\php\phpunit(53): PHPUnit_TextUI_Command::main()
#3 {main}
  thrown in C:\xampp\php\PEAR\PHPUnit\Util\Skeleton\Test.php on line 125

and the test’s don’t get executed.

the myprojectetstsuite.php looks like this.

<?php

use Symfony\Component\Finder\Finder;

class MyProjectTestSuite extends PHPUnit_Framework_TestSuite
{

    public static function suite()
    {
        $suite = new MyProjectTestSuite();
        $finder = new Finder();

        // ---------- COMMENT OUT TO TEST A SPECIFIC FILE ----------
        // $suite->addTestFile('../src/<yourbundle>/DefaultBundle/Tests/Controller/SomeControllerTest.php');
        // return $suite;
        // ----------

        echo "Searching for test cases...\n\n";
        foreach ($finder->files()->in('../src/')->name('*Test.php') as $file) {
            if (preg_match('%\\Tests\\[\w-\\]+Test.php%i', $file->getPathName())) {
                echo 'Adding test : ' . $file->getPathName() . "\n";
                $suite->addTestFile($file->getPathName());
            }
        }
        echo "\n";

        return $suite;
    }

}
  • 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-06T23:33:10+00:00Added an answer on June 6, 2026 at 11:33 pm

    okey.. if the test suite does not find any tests netbeans takes up there default test suite it apears. i ajusted my code abit so that I was sure I found some tests (commented out the regex) and there they all where.

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

Sidebar

Related Questions

i'm php coder, trying to get into python world, and it's very hard for
I am trying very hard to get a bus error. One way is misaligned
I've been trying very very hard to create a simple simple iOS app which
I have been trying very hard to achieve rounded corners with IE6+jquery ui tabs.
I'm having a very hard time trying to access a custom configuration section in
I am having a hard time trying to make the very last UITableViewCell from
I am trying to get Mercurial hgweb working using ISAPI following those two links
I have been trying very hard to style the text size and colour on
I am having a hard time trying to get Qt running. I downloaded the
I'm trying to retrieve some information about my hard drives using PowerShell (very new

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.