Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
PHPDoc in WebTestBase::setUp() states that it would take a parameter, but it doesn't. Seems to be a leftover.
Also, the $modules property should be defined and documented in WebTestBase.
The fact that it isn't, might be to allow for collecting the $modules from inheriting classes with this code:
while ($class) {
if (property_exists($class, 'modules')) {
$modules = array_merge($modules, $class::$modules);
}
$class = get_parent_class($class);
}
but maybe we can solve that differently.
It would really be nice to replace all the same generic PHPDocs by @inheritdoc in the test classes.
Comments
Comment #0.0
PanchoUpdated issue summary.
Comment #4
Mile23You can see the current docblock for WebTestBase::setUp() here: https://api.drupal.org/api/drupal/core%21modules%21simpletest%21src%21We...
It doesn't seem to mention passing in parameters.
It does say how to set up ::modules and ::profile, and of course the full documentation is on FunctionalTestSetupTrait::installModulesFromClassProperty here: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Test%21Fu...
If there are any specific improvements, maybe give more specific details and/or a patch. Thanks.
Comment #5
Mile23Closing as duplicate of #1938174: WebTestBase does not properly describe how to enable modules during setUp() which has a patch.