Commit c35ae62e authored by Dries's avatar Dries

- Patch #1560028 by bleen18, sun: remove all calls to rand() from tests.

parent c3cdbc0f
......@@ -430,7 +430,7 @@ protected function testFilter() {
$severity = WATCHDOG_EMERGENCY;
for ($j = 0; $j < 3; $j++) {
$types[] = $type = array(
'count' => mt_rand(1, 5),
'count' => $j + 1,
'type' => $type_name,
'severity' => $severity++,
);
......
......@@ -135,7 +135,7 @@ function testFieldInvokeMultiple() {
$options = array();
$entities = array();
$entity_type = 'test_entity';
$entity_count = mt_rand(2, 5);
$entity_count = 5;
$available_langcodes = field_available_languages($this->entity_type, $this->field);
for ($id = 1; $id <= $entity_count; ++$id) {
......
......@@ -44,7 +44,7 @@ function testActionLoop() {
// recursion level should be kept low enough to prevent the xdebug
// infinite recursion protection mechanism from aborting the request.
// See http://drupal.org/node/587634.
variable_set('actions_max_stack', mt_rand(3, 12));
variable_set('actions_max_stack', 7);
$this->triggerActions();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment