phpunit, netbeans and Symfony 2

  • From: "yesso" < >
  • To:
  • Subject: phpunit, netbeans and Symfony 2
  • Date: Sat, 07 Jan 2012 23:13:45 +0000

Hello, I'm trying to be able to push alt-f6 to run my Symfony 2 unit tests in 
Netbeans.

The unit tests run fine from the CLI: from the /app subfolder, I run phpunit, 
which reads phpunit.xml from that directory and then finds and runs all tests.

In Netbeans, when I specify my phpunit.xml in the project properties and push 
alt-f6, I get:

PHP Fatal error:  Uncaught exception 'PHPUnit_Framework_Exception' with 
message 'Could not find class "" in "C:\Program Files\NetBeans 
7.1\php\phpunit\NetBeansSuite.php".' in 
C:\wamp\bin\pear\pear\PHPUnit\Util\Skeleton\Test.php:123

I don't know why it's accessing NetBeansSuite.php if I've specified an .xml 
file.  The .xml file specifies how to find the tests.

I've tried setting "Use Custom Test Suite", and point to a test suite that 
can find the Symfony 2 test files.  But Netbeans doesn't care.  It still 
tries to use NetBeansSuite.php.  I can get it to work if I follow the 
NetBeans instructions and let NetBeans generate test classes based on 
existing source, but this is not compatible with a test-first workflow, nor 
is it compatible with the default Symfony 2 folder structure.

So, what is the proper way to get NetBeans to run Symfony 2 unit tests?






phpunit, netbeans and Symfony 2

yesso 01/07/2012

Re: phpunit, netbeans and Symfony 2

Tomas Mysik 01/09/2012

Project Features

About this Project

PHP was started in November 2009, is owned by Petr Jiricka, and has 307 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close