Needs work
Project:
Drupal core
Version:
main
Component:
phpunit
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Aug 2018 at 08:41 UTC
Updated:
3 Apr 2023 at 05:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mondrakeComment #3
mondrakeComment #5
mondrakeReroll
Comment #7
mondrakeComment #8
daffie commented@mondrake: Is it possible to add testing for this?
Comment #9
mondrake#8 not easily in core, you'd have to develop a fake db driver that actually installs :(
I'm using this patch in the TravisCI test builds of my experimental Doctrine DBAL driver, that instead of providing user/password fields in the install form, just provides a textbox to insert a Doctrine DBAL connection URL.
Comment #10
daffie commentedIf we cannot create testing for this then it must be very good documentated. In the patch and linked to this issue. Can you add screenshots/browser output with what good wrong. We need to make very clear why the code change is needed and hopefully make sure that somebody does not undo the change by eccident.
Comment #13
mondrakeRerolled
Comment #14
daffie commentedI have found a way to test this patch. In #3128699: Testing issue for pgsql_fallback is work being done to make the PostgreSQL fallback driver testable with Drupal core. Part of the current patch is:
When I remove this part of the patch the testbot fails with 69 extra fails. See #3112735-90: [IGNORE] testing issue.
When I then add the patch from this issue, all those extra failures are fixed. See #3112735-89: [IGNORE] testing issue.
For me this is "prove" that the patch works.
All the changes in the patch looks good to me.
For me it is RTBC.
@mondrake: Thank you for you work on this issue!
Comment #15
catch$edit was used in drupal_get_form() (via $_POST['edit']) a long time ago, but it's not (or shouldn't be) in common usage any longer. Could we change both $edit and $temp_edit to something more descriptive? I tried to think of them and couldn't though...
Comment #16
catchMaybe $form_values and $form_values_to_submit?
Comment #17
mondrakeGood suggestion in #16!
Comment #18
adityasingh commentedUpdated patch as suggested in #16.
Comment #19
mondrakeThanks!
Comment #20
alexpottI think this fix is being done in the wrong place. It feels as though \Drupal\Core\Test\FunctionalTestSetupTrait::installParameters() needs to get the correct params for the form. Perhaps we need to call \Drupal\Core\Database\Install\Tasks::getFormOptions() here and make sure we're doing the right thing. Or we need so new method on the db connection to get install settings.
But the current solution has the downside of hiding errors if installParameters() sets something up incorrectly.
Comment #21
mradcliffeI performed Novice Triage on this issue. I am leaving the Novice tag on this issue because I think that the direction @alexpott provided in #20 should be sufficient to fix.
I changed the issue summary proposed resolution to reflect this.
Comment #25
mondrakeRerolled
Comment #26
akashkumar07 commentedComment #27
mondrakeStill needs work for #20, the reroll did not address that
Comment #28
andregp commentedI tried to address #20.
No interdiff as it's a completely different code (different file and approach).
Comment #30
smustgrave commentedLast patch had some failures.
Comment #31
sahil.goyal commentedFor resolving such failure need to create a concrete subclass that extends the abstract Tasks class, and then instantiate the subclass instead of the abstract class directly. updating the patch and Interdiff along.