Closed (fixed)
Project:
Drupal core
Version:
8.5.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Feb 2018 at 00:00 UTC
Updated:
23 Mar 2018 at 00:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jhedstromComment #3
jhedstromActually, I think it makes more sense to split the web browser bits out of
FormObjectTest, as they aren't utilizing the config test base at all. That way we only need to add a kernel test version instead of both.Comment #4
dawehnerIt is quite nice that you can use a kernel test here! I like the fact that this makes it quite easy to write tests for these forms.
Comment #5
jhedstromI've added a change record. This patch fixes the
@deprecatedtext which applied to the approach in #2 rather than the approach in #3.Comment #6
lendude@jhedstrom nice! kerneltest++
couple of things I still see:
'or \Drupal\Tests\system\Kernel\Form\FormObjectTest'.
Also needs a 'see' to the CR and a @trigger_error under the namespace (should be safe since it's not in use in core anymore now)
This comment could use an update since it's not really an english sentence. I know it would still exist in SystemConfigFormTestBase but lets at least clean it up in the new class.
Comment #7
jhedstromThis should address #6.
Comment #8
dawehnerMaking it easier for people to write simple tests seems like a good idea.
Comment #9
alexpottCommitted 40d534a and pushed to 8.6.x. Thanks!
This can be backported to 8.5.x without the deprecation of the webtestbase class - to keep 8.5.x and 8.6.x testbases in sync.
Fixed unused uses on commit.
Comment #11
alexpottDid the backport myself by just not including the changes to core/modules/system/src/Tests/System/SystemConfigFormTestBase.php
Committed a259c82 and pushed to 8.5.x. Thanks!