Skip to content

Wrong call to phpunit when asking for test groups #8082

@tenzap

Description

@tenzap

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

"/usr/bin/php" ".../vendor/bin/phpunit" "--colors" "--configuration" ".../application/tests/phpunit.xml" "--list-groups" "."

Output it

PHPUnit 10.5.40 by Sebastian Bergmann and contributors.

Available test group(s):
Done.

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.

"/usr/bin/php" ".../vendor/bin/phpunit" "--colors" "--configuration" ".../application/tests/phpunit.xml" "--list-groups"
PHPUnit 10.5.40 by Sebastian Bergmann and contributors.

Available test group(s):
 - default
 - html5

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    PHP[ci] enable extra PHP tests (php/php.editor)kind:bugBug report or fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions