laravel/dusk

Dusk Doesn't Recognize Attribute-based Grouping

paulrrogers opened this issue · 4 comments

Dusk Version

8.2.5

Laravel Version

11.22

PHP Version

8.2

PHPUnit Version

11

Database Driver & Version

No response

Description

Dusk doesn't recognize attribute grouping (#[Group('special')]), while PHPUnit 11 complains about /** @group … */ comments:

WARN Metadata found in doc-comment for class … . Metadata in doc-comments is deprecated and will no longer be supported in PHPUnit 12. Update your test code to use attributes instead.

Steps To Reproduce

  1. put #[Group('special')] above a Dusk test method
  2. php artisan dusk --group=special
  3. expect to see just that test run, yet "No tests found" appears instead

Thank you for reporting this issue!

As Laravel is an open source project, we rely on the community to help us diagnose and fix issues as it is not possible to research and fix every issue reported to us via GitHub.

If possible, please make a pull request fixing the issue you have described, along with corresponding tests. All pull requests are promptly reviewed by the Laravel team.

Thank you!

yeah i think dusk needs to update their testcase for it to work with attributes, i have the same thing, but thats gonna be an issue starting from phpunit 12, for now you only get a warning

Did you import the correct attribute class?

use PHPUnit\Framework\Attributes\Group;

Hey there,

We're closing this issue because it's inactive, already solved, old, or not relevant anymore. Feel free to open up a new issue if you're still experiencing this problem.