-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Fix tests #30972
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
[Form] Fix tests #30972
Conversation
chalasr
commented
Apr 7, 2019
Q | A |
---|---|
Branch? | 3.4 |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
@@ -296,7 +296,7 @@ public function uploadFileErrorCodes() | |||
{ | |||
return [ | |||
'no error' => [UPLOAD_ERR_OK, null], | |||
'upload_max_filesize ini directive' => [UPLOAD_ERR_INI_SIZE, 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'], | |||
'upload_max_filesize ini directive' => [UPLOAD_ERR_INI_SIZE, 'The file is too large. Allowed maximum size is 2 MiB.'], |
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.
I think we need to add an ini_set()
call for upload_max_filesize
to have a deterministic failure.
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.
We should be able to inject a mocked translator in FileType actually, but it reveals another issue: we can't set the translator since FormFactoryBuilder
instantiates the CoreExtension()
on its own, there is no way to pass a translator or any other CoreExtension dependency. Just had a brainstorm with @stof and @HeahDude, we might need another PR...
|
ready |
Thank you @chalasr. |
This PR was merged into the 3.4 branch. Discussion ---------- [Form] Fix tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Commits ------- 35418be [Form] Fix tests