Исправлены тесты компании и клиента

This commit is contained in:
2020-05-29 22:24:15 +08:00
parent 9d7dd75cd9
commit 4cf6e81d5f
4 changed files with 29 additions and 77 deletions

View File

@@ -42,7 +42,22 @@ class BasicTestCase extends TestCase
*/
public function tearDown(): void
{
//parent::tearDown();
}
/**
* Возвращает случайную строку указанной длины
*
* @param int $length
* @return string
*/
protected static function randomString($length = 8)
{
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$string = '';
for ($i = 0; $i < $length; $i++) {
$string .= $characters[mt_rand(0, strlen($characters) - 1)];
}
return $string;
}
}