mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
Expand test code.
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user