Loading core/tests/Drupal/Tests/UnitTestCase.php +1 −25 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ abstract class UnitTestCase extends TestCase { use PhpUnitCompatibilityTrait; use ProphecyTrait; use ExpectDeprecationTrait; use RandomGeneratorTrait; /** * The app root. Loading Loading @@ -73,31 +74,6 @@ public function __get(string $name) { } } /** * Generates a unique random string containing letters and numbers. * * @param int $length * Length of random string to generate. * * @return string * Randomly generated unique string. * * @see \Drupal\Component\Utility\Random::name() */ public function randomMachineName($length = 8) { return Random::machineName($length); } /** * Gets the random generator for the utility methods. * * @return \Drupal\Component\Utility\Random * The random generator */ protected function getRandomGenerator() { return Random::getGenerator(); } /** * Returns a stub config factory that behaves according to the passed array. * Loading Loading
core/tests/Drupal/Tests/UnitTestCase.php +1 −25 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ abstract class UnitTestCase extends TestCase { use PhpUnitCompatibilityTrait; use ProphecyTrait; use ExpectDeprecationTrait; use RandomGeneratorTrait; /** * The app root. Loading Loading @@ -73,31 +74,6 @@ public function __get(string $name) { } } /** * Generates a unique random string containing letters and numbers. * * @param int $length * Length of random string to generate. * * @return string * Randomly generated unique string. * * @see \Drupal\Component\Utility\Random::name() */ public function randomMachineName($length = 8) { return Random::machineName($length); } /** * Gets the random generator for the utility methods. * * @return \Drupal\Component\Utility\Random * The random generator */ protected function getRandomGenerator() { return Random::getGenerator(); } /** * Returns a stub config factory that behaves according to the passed array. * Loading