Skip to content
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

Dusk Doesn't Recognize Attribute-based Grouping #1128

Closed
paulrrogers opened this issue Sep 10, 2024 · 4 comments
Closed

Dusk Doesn't Recognize Attribute-based Grouping #1128

paulrrogers opened this issue Sep 10, 2024 · 4 comments

Comments

@paulrrogers
Copy link

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
Copy link

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!

@nielsvh2103
Copy link

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

@crynobone
Copy link
Member

Did you import the correct attribute class?

use PHPUnit\Framework\Attributes\Group;

@crynobone
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants