diff --git a/tests/Helper.php b/tests/Helper.php new file mode 100644 index 0000000..fbc665a --- /dev/null +++ b/tests/Helper.php @@ -0,0 +1,26 @@ +@'. + */ + public static function generateRandomPeer(string $domain, int $length=16, string $prefix='userTest'): string + { + $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $charactersLength = strlen($characters); + $randomString = ''; + + for ($i = 0; $i < $length; $i++) + { + $randomString .= $characters[rand(0, $charactersLength - 1)]; + } + + return sprintf('%s%s@%s', $prefix, $randomString, $domain); + } + } \ No newline at end of file