protected function DataTestCaseUI::uniqueRandomName in Data 7
Same name and namespace in other branches
- 6 data_ui/tests/data_ui.test \DataTestCaseUI::uniqueRandomName()
Create a _unique_ random name.
1 call to DataTestCaseUI::uniqueRandomName()
- DataTestCaseUI::randomFields in data_ui/
tests/ data_ui.test - Generate N random fields. Will create at least 1 field.
File
- data_ui/
tests/ data_ui.test, line 306
Class
- DataTestCaseUI
- Test basic Data API functionality.
Code
protected function uniqueRandomName() {
static $names;
do {
$name = $this
->randomName();
} while (isset($names[$name]));
$names[$name] = $name;
return $name;
}