Expand test code.

This commit is contained in:
James Cole
2021-03-19 06:12:28 +01:00
parent b4d44fdd2b
commit 03d3ede036
37 changed files with 1343 additions and 1187 deletions

View File

@@ -54,21 +54,12 @@ trait RandomValues
return array_merge($res1, $res2);
}
/**
* @return string
*/
protected function randomAccountRole(): string
protected function getRandomAmount(): string
{
return $this->randomFromArray(['defaultAsset', 'sharedAsset', 'savingAsset']);
}
/**
* @return string
*/
protected function randomLiabilityType(): string
{
return $this->randomFromArray(['loan', 'debt', 'mortgage']);
return number_format(rand(1000, 100000) / 100, '2', '.');
}
/**
@@ -79,14 +70,6 @@ trait RandomValues
return $this->randomFromArray(['EUR', 'USD', 'GBP']);
}
/**
* @return string
*/
protected function getRandomAmount(): string
{
return number_format(rand(1000, 100000) / 100, '2', '.');
}
/**
* @return string
*/
@@ -98,6 +81,14 @@ trait RandomValues
return $date->format('Y-m-d');
}
/**
* @return string
*/
protected function getRandomInterestPeriod(): string
{
return $this->randomFromArray(['daily', 'monthly', 'yearly']);
}
/**
* @return string
*/
@@ -109,9 +100,9 @@ trait RandomValues
/**
* @return string
*/
protected function getRandomInterestPeriod(): string
protected function randomAccountRole(): string
{
return $this->randomFromArray(['daily', 'monthly', 'yearly']);
return $this->randomFromArray(['defaultAsset', 'sharedAsset', 'savingAsset']);
}
/**
@@ -123,4 +114,12 @@ trait RandomValues
{
return $array[rand(0, count($array) - 1)];
}
/**
* @return string
*/
protected function randomLiabilityType(): string
{
return $this->randomFromArray(['loan', 'debt', 'mortgage']);
}
}