mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Improve test coverage and quality
This commit is contained in:
@@ -51,6 +51,21 @@ use RuntimeException;
|
||||
*/
|
||||
abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function randomInt(): int
|
||||
{
|
||||
$result = 4;
|
||||
try {
|
||||
$result = random_int(1, 100000);
|
||||
} catch (Exception $e) {
|
||||
Log::debug(sprintf('Could not generate random number: %s', $e->getMessage()));
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
* @param string $range
|
||||
|
Reference in New Issue
Block a user