This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
A working Symfony 2.8 project has been re-created in a Symfony 3.1 branch. The 3.1 branch behaves as the 2.8 branch in both prod and dev environments. Any attempt to test the 3.1 project in Netbeans results in "Fatal error: Class 'AppBundle\Tests\AppWebTestCase' not found in ...\src\AppBundle\Tests\AdminTest.php". The error is independent of the location\namespace of AppWebTestCase. The error occurs in both testing the entire project or running a focused test. The project tests successfully from the command line. The 2.8 branch can be successfully tested within Netbeans. The failure to test occurs in Netbeans version 8.1 and development build 201607050002.
Could you please attach a sample project we can use to reproduce this issue? Thanks.
Created attachment 161492 [details] Sample Symfony project
Sample test project attached above. Testing performed in Build 201607050002 using Windows 10 Pro 64-bit, freshly installed Symfony project with PHPUNIT configured in Netbeans. Netbeans project directory is included in zip.
Incorrect project setup - you have set bootstrap in Project Properties dialog to a wrong file (the proper one is specified in the PHPUnit XML configuratiorn [1]). Simply uncheck the "Use Bootstrap" in your Project Properties and it will work. Thanks for reporting. [1] bootstrap="app/autoload.php"
Thanks for the update. Did I miss documentation of this Netbeans difference between Symfony 2 & Symfony 3?
I am not Symfony expert so perhaps they changed their bootstrap file for Symfony 3? Or your project setup was just incorrect? I do not know, sorry.
In other words, this has nothing to do with NetBeans ;)
Turns out it's my faulty assumption that the checkbox for "Use bootstrap" in PHPUnit config was to be checked. In Symfony 2, checking that box and specifying the Symfony bootstrap file, I just learned, did not prevent testing. In Symfony 3 it does. While I appreciate that this behavior difference is due to action on Symfony's part, is there some way to provide a notice in Netbeans documentation? I'm happy to help.
(In reply to geoB from comment #8) > While I appreciate that this behavior > difference is due to action on Symfony's part, is there some way to provide > a notice in Netbeans documentation? I'm happy to help. IMO the best way is to report a new issue against documentation [1]; describe what documentation text exactly should be changed, where and how. Thanks. [1] https://netbeans.org/bugzilla/enter_bug.cgi?product=usersguide