junichi11 / cakephp-netbeans

CakePHP support in NetBeans
http://cakephp.org
71 stars 18 forks source link

PHPUnit, CakePHP & Netbeans - Testing Sessions #82

Closed lakhman closed 10 years ago

lakhman commented 10 years ago

Hi,

Great plugin, it helps me so much, I write all my apps in cakephp, so its a big time saver!

The phpunit part of the plugin works fine with netbeans, but I have a small issue. In cakephp you can test sessions (through the web runner), but in netbeans, these tests fail because sessions are not available via PHP CLI.

Is it possible in any way to run the tests through the web runner, or within the netbeans browser, or run them in a browser, and return the response to netbeans, to give us access to the session? (and also all netbeans features like code coverage).

This is rather annoying, as my code coverage in netbeans doesn't show session parts as being covered (because they fail the test), and the fact that tests fail when testing, makes using phpunit through netbeans, worthless.

Just a feature improvement if it can be achieved!

Thanks so much for this awesome plugin! ;)

junichi11 commented 10 years ago

Hi @justanil

Please try to add --stderr option. (Sorry, I have not confirmed it yet.) e.g. nbproject/phpunit.sh

passthru($command . ' ' . $args);

=>

$options = '--stderr';
passthru($command . ' ' . $options . ' ' . $args);

Thanks.

lakhman commented 10 years ago

Hi!

That worked a treat!.. Thanks! You should consider updating your documentation or the script to do this by default!, This is so useful to be able to unit test directly in netbeans (with code coverage!!)

Thanks so much for the solution and the excellent plugin!!

lakhman commented 10 years ago

Closed.

junichi11 commented 10 years ago

Thanks for your confirmation :) I'll add a setting for --stderr to options.

Thanks.