By penyaskito on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Issue links:
Description:
DrupalTestBase and UnitTestCase include a helper called randomName() for generating a random machine name.
randomName() does not entirely clarify the function's purpose: to generate a random machine name, for use generating already-validated machine names.
randomMachineName() is more clear on the purpose on the method, avoiding confusion with randomString(). This common confusion has a history of providing random errors because of wrong usage because the difference is not well spot for novices.
Before
$action_label = $this->randomName();
After
$action_label = $this->randomMachineName();
Impacts:
Module developers