-
Notifications
You must be signed in to change notification settings - Fork 407
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
[TASK] Update functional tests examples #4784
[TASK] Update functional tests examples #4784
Conversation
Mainly: - Remove superfluous "Test Case" comment - Add `declare(strict_types=1);` as best practise - Use `@test` annotation as best practise like the Core does - Add `void` return type as best practise - Add `typo3/testing-framework` as requirement to have code completion in the PHP files Note: As this is set to be merged also to 12.4, the `@test` annotation is used (instead of the `#[Test]` annotation) to be compatible with testing framework v7 and v8 (v7 is compatible with phpunit 9/10 and TYPO3 v11/v12, v8 is compatible with phpunit 10/11 and TYPO3 v12/v13). In a follow-up only to main (v13) this will be changed to the annotation. Releases: main, 12.4
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.
Thank you. Much better than the earlier "testMethod" solution.
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.
Thank you, looks food
The backport to
stderr
stdout
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-12.4 12.4
# Navigate to the new working tree
cd .worktrees/backport-12.4
# Create a new branch
git switch --create backport-4784-to-12.4
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick 530bcc2d84cf92ec6a382b5d865c75d44ebfa518,8dbe4bbf895c63e3117d869cf08c58e2fd90ac97,494bcb207f623e91f0c4e6117dc6d30b84aa02e3
# Push it to GitHub
git push --set-upstream origin backport-4784-to-12.4
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-12.4 Then, create a pull request where the |
Will take care of the backport. |
…tation#4784) Mainly: - Remove superfluous "Test Case" comment - Add `declare(strict_types=1);` as best practise - Use `@test` annotation as best practise like the Core does - Add `void` return type as best practise - Add `typo3/testing-framework` as requirement to have code completion in the PHP files Releases: main, 12.4
This file is a leftover from TYPO3-Documentation#4784. It is already fixed in main with TYPO3-Documentation#4794. Releases: 12.4
Mainly: - Remove superfluous "Test Case" comment - Add `declare(strict_types=1);` as best practise - Use `@test` annotation as best practise like the Core does - Add `void` return type as best practise - Add `typo3/testing-framework` as requirement to have code completion in the PHP files Releases: main, 12.4
declare(strict_types=1);
as best practise@test
annotation as best practise like the Core doesvoid
return type as best practisetypo3/testing-framework
as requirement to have code completion in the PHP filesNote: As this is set to be merged also to 12.4, the
@test
annotation is used (instead of the#[Test]
annotation) to be compatible with testing framework v7 and v8 (v7 is compatible with phpunit 9/10 and TYPO3 v11/v12, v8 is compatible with phpunit 10/11 and TYPO3 v12/v13). In a follow-up only to main (v13) this will be changed to the annotation.Releases: main, 12.4