Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I can't enable modules in the while running the selenium test cases. I am able to do so in the SimpleTest test cases. I tried it on a fresh install of drupal too.
Comments
Comment #1
ygerasimov CreditAttribution: ygerasimov commentedIt should work completely the same. You should be able to enable modules passing arguments to setUp().
Implementation of the setUp() method for DrupalSeleniumWebTestCase is
protected function setUp() {
$modules = func_get_args();
parent::setUp($modules);
//...
}
So everything passed to it is passed to parent setUp method that should enable modules for you.
Please let me know if it doesn't work and give me example so I can reproduce the problem.
Comment #2
pbuyle CreditAttribution: pbuyle commentedIn D6,
DrupalWebTestCase::setUp
used a variable-length argument list as modules list. In D7, it supports both a variable-length argument list or an array as first argument. The array as first argument is the recommended way of using it and the variable-length argument list support will be removed in D8.DrupalSeleniumWebTestCase::setUp
callparent::setUp(func_get_args())
and thus only support the old deprecated Drupal 6 way of enabling module in a SimpleTest class.Comment #3
PatchRanger CreditAttribution: PatchRanger commentedClosed as a duplicate of #1876120: Fix setUp: let it get modules list as a single array, since that one has a patch.
Comment #3.0
PatchRanger CreditAttribution: PatchRanger commentedtried on fresh install