-
Notifications
You must be signed in to change notification settings - Fork 861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong call to phpunit when asking for test groups #8082
Comments
@tenzap Can you provide an example project as a zip file to reproduce it? |
See: https://github.com/tenzap/phpunit-simple-example/tree/nb24-issue8082 Launching It looks like if I tick "test project using just phpunit", it shouldn't add the Actually the BTW, if I tick "use XML configuration", maybe netbeans shouldn't even append the test dir to any phpunit call? I don't know if this makes sense. |
@tenzap Thanks for the example. |
@tmysik Can we remove netbeans/php/php.phpunit/src/org/netbeans/modules/php/phpunit/commands/PhpUnit.java Lines 348 to 354 in be051eb
|
@junichi11 I would guess so, if it works correctly without it. You know, this was implemented a very long time ago, so PHPUnit CLI could have changed several times already 🙂 |
@tmysik OK, I thought it may have a specific reason :) |
It was not working without it, definitely 😁 In ~2010 or so 😁 |
I think that if a XML config file is set or if we tick to use just phpunit, the dir should not be set, |
It doesn't work without |
Why do you use '.' instead of the test dirs? Wouldn't it be more correct to run the command with the test dir as set in the 'properties/testing' window of the project (which is the value used in the phounit command when not ticking 'use just phpunit' option)? |
Maybe, because you can run it on a directory underneath the test one? In such a case, you need the actual directory. Just guessing, I can be wrong, of course. |
For example, with phpunit 10.5
From what I understand in source code of phpunit 10.5
So netbeans could work like this:
|
Can you provide examples(work/don't work) with exact steps to reproduce them? |
isn't the sample I provided sufficient? |
Well, Misunderstandings often occur because I'm not you...(We can't often reproduce issues.) Works fine:
Don't work:
|
Apache NetBeans version
Apache NetBeans 24
What happened
The call to phpunit when asking for test groups isn't correct so that it reports that there is no group.
Updating the call would fix the issue.
Language / Project Type / NetBeans Component
PHP, testing with phpunit
How to reproduce
I setup a PHP project to run tests with PHPUnit
In the phpunit config (project properties / Testing / PHPUnit) I check "Ask for test groups before running tests".
I also have "test project using phpunit command only" set. As well as the XML file, and path to phpunit.
netbeans will invoke phpunit with
Output it
The part
"--list-groups" "."
should actually be"--list-groups"
(ie. without the"."
part).When I run the command myself without the
"."
part), phpunit returns the list of groups, otherwise it doesn't.Did this work correctly in an earlier version?
No / Don't know
Operating System
Debian 12
JDK
Java: 17.0.13; OpenJDK 64-Bit Server VM 17.0.13+11-Debian-2deb12u1
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
No response
Are you willing to submit a pull request?
No
The text was updated successfully, but these errors were encountered: