Improve randomness in test data to prevent key collisions.

This commit is contained in:
James Cole
2018-07-14 16:41:07 +02:00
parent ff403dfa2e
commit 3d1523a060
50 changed files with 283 additions and 283 deletions

View File

@@ -280,7 +280,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -464,7 +464,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -566,7 +566,7 @@ class TransactionTransformerTest extends TestCase
$category = Category::create(
[
'user_id' => $this->user()->id,
'name' => 'Random category #' . random_int(1, 1000),
'name' => 'Random category #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -1024,7 +1024,7 @@ class TransactionTransformerTest extends TestCase
$budget = Budget::create(
[
'user_id' => $this->user()->id,
'name' => 'Random budget #' . random_int(1, 1000),
'name' => 'Random budget #' . random_int(1, 10000),
'active' => 1,
]
);
@@ -1128,7 +1128,7 @@ class TransactionTransformerTest extends TestCase
$category = Category::create(
[
'user_id' => $this->user()->id,
'name' => 'Random category #' . random_int(1, 1000),
'name' => 'Random category #' . random_int(1, 10000),
'active' => 1,
]
);