mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-15 19:09:50 +00:00
Improve randomness in test data to prevent key collisions.
This commit is contained in:
@@ -142,7 +142,7 @@ class AccountTransformerTest extends TestCase
|
||||
'noteable_id' => $account->id,
|
||||
'noteable_type' => Account::class,
|
||||
'title' => null,
|
||||
'text' => 'I am a note #' . random_int(1, 1000),
|
||||
'text' => 'I am a note #' . random_int(1, 10000),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -233,7 +233,7 @@ class AccountTransformerTest extends TestCase
|
||||
'noteable_id' => $account->id,
|
||||
'noteable_type' => Account::class,
|
||||
'title' => null,
|
||||
'text' => 'I am a note #' . random_int(1, 1000),
|
||||
'text' => 'I am a note #' . random_int(1, 10000),
|
||||
]
|
||||
);
|
||||
|
||||
@@ -421,7 +421,7 @@ class AccountTransformerTest extends TestCase
|
||||
'noteable_id' => $account->id,
|
||||
'noteable_type' => Account::class,
|
||||
'title' => null,
|
||||
'text' => 'I am a note #' . random_int(1, 1000),
|
||||
'text' => 'I am a note #' . random_int(1, 10000),
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ class TagTransformerTest extends TestCase
|
||||
$tag = Tag::create(
|
||||
[
|
||||
'user_id' => $this->user()->id,
|
||||
'tag' => 'Some tag ' . random_int(1, 1000),
|
||||
'tag' => 'Some tag ' . random_int(1, 10000),
|
||||
'tagMode' => 'nothing',
|
||||
'date' => '2018-01-01',
|
||||
'description' => 'Some tag',
|
||||
|
||||
@@ -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,
|
||||
]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user