-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Replace PHPDoc dataProvider with attribute syntax #21612
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -403,13 +403,12 @@ checks that all application URLs load successfully:: | |||
| // tests/ApplicationAvailabilityFunctionalTest.php | ||||
| namespace App\Tests; | ||||
|
|
||||
| use PHPUnit\Framework\Attributes\DataProvider; | ||||
| use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | ||||
|
|
||||
| class ApplicationAvailabilityFunctionalTest extends WebTestCase | ||||
| { | ||||
| /** | ||||
| * @dataProvider urlProvider | ||||
| */ | ||||
| #[DataProvider('urlProvider')] | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. symfony-docs/validation/custom_constraint.rst Line 584 in 3b6b704
Could also be updated ?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @alamirault shall we create a DOCtor rule for using phpunit attributes and search and report the most common ones?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We did this update while merging. Thanks!
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not yet, not enough occurrence |
||||
| public function testPageIsSuccessful($url): void | ||||
| { | ||||
| $client = self::createClient(); | ||||
|
|
@@ -418,7 +417,7 @@ checks that all application URLs load successfully:: | |||
| $this->assertResponseIsSuccessful(); | ||||
| } | ||||
|
|
||||
| public function urlProvider(): \Generator | ||||
| public static function urlProvider(): \Generator | ||||
| { | ||||
| yield ['/']; | ||||
| yield ['/posts']; | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make the data provider itself static, thanks