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

@@ -142,8 +142,8 @@ class BillControllerTest extends TestCase
// data to submit:
$data = [
'name' => 'New bill #' . random_int(1, 1000),
'match' => 'some,words,' . random_int(1, 1000),
'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '66.34',
'amount_max' => '45.67',
'date' => '2018-01-01',
@@ -187,8 +187,8 @@ class BillControllerTest extends TestCase
$repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection());
// data to submit:
$data = [
'name' => 'New bill #' . random_int(1, 1000),
'match' => 'some,words,' . random_int(1, 1000),
'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '12.34',
'amount_max' => '45.67',
'date' => '2018-01-01',
@@ -226,8 +226,8 @@ class BillControllerTest extends TestCase
$repository->shouldReceive('getRulesForBill')->withAnyArgs()->andReturn(new Collection());
// data to submit:
$data = [
'name' => 'New bill #' . random_int(1, 1000),
'match' => 'some,words,' . random_int(1, 1000),
'name' => 'New bill #' . random_int(1, 10000),
'match' => 'some,words,' . random_int(1, 10000),
'amount_min' => '12.34',
'amount_max' => '45.67',
'date' => '2018-01-01',