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.
<? class FooTests extends PHPUnit_Framework_TestCase { /** * @test * @expectedException \foo\bar\BazException */ public function testStuff() { // ... } } ?> "Fix Uses in Current Namespace" will import the BazException and shorten the @expectedException \foo\bar\BazException to @expectedException BazException. It is all good for me, but PHPUnit is not that smart and expects \BazException (from global namespace). While I am aware of the fact, that it is PHPUnits fault, it is really troublesome and I am not sure whether they will fix it or not. I enjoy this feature for @return, @param and @var annotations, but I'd like to blacklist @expectedException. Product Version = NetBeans IDE Dev (Build 201210280001) Operating System = Linux version 3.2.0-33-generic-pae running on i386 Java; VM; Vendor = 1.7.0_09 Runtime = OpenJDK Client VM 23.2-b09
Created attachment 128268 [details] IDE log
I'll think about it...but as you wrote, it's definitely PHPUnits fault :(
I'm gonna leave this here: https://github.com/sebastianbergmann/phpunit/issues/730 :)
PHPUnit is not going to fix that, as it's going to blow up phpUnit runtime. So please add an option to make this behavior depending on an option flag.