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.
Attempting to "Run Focused Test Method" within a unit test results in "no test method found" unless the file name ends with Test.php e.g. create two identical files my.test.php and myTest.php that both contain <?php class MyTest extends PHPUnit_Framework_TestCase { public function testThisThing() { $this->assertTrue(TRUE); } } trying to "Run Focused Test Method" will work in the myTest.php file but will not work in the my.test.php file I am working with a large existing codebase that has older conventions so that simply renaming all the tests will be time consuming and in my opinion should not be required.
having looked into things some more, I think that the issue raised may be slightly different. I have set the phpunit suffix in the phpunit.xml file like this : <testsuite name="MyApplication"> <directory suffix=".test.php">./Test/Application</directory> <directory suffix=".test.php">./Test/Libraries</directory> </testsuite> when Netbeans executes a full set of tests this file is read and all the tests run ok. However when I attempt to run focused test method it appears that this file is not parsed so the phpunit default of *Test.php is assumed.
Reproducible. "Run Focused Test Method" is working only in files which names ends with Test.php. Product Version: NetBeans IDE Dev (Build 201311140002) Java: 1.7.0_45; Java HotSpot(TM) Client VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Windows 7 version 6.1 running on x86; Cp1250; en_US (nb)
Well, we do not parse any XML config and simply use just "Test" suffix as it is the default (and it works fine from NB 6.7 ;). Not sure if we can do anything with this issue easily but I will have a look at it. BTW this issue is more enhancement than a bug... Thanks.
Thanks for the comments Tomas, I have changed the issue type to enhancement.
*** Bug 239081 has been marked as a duplicate of this bug. ***
Any updates on this issue? I have a complete series of test cases, and right now I use the rerun failed tests as a way of not running everything, Not sure why the system would understand that I want to run a test at that point in the file I have opened and then look for a filename pattern? maybe change the design to popup for a method name to test?