endtoend-test-psl/tests/Psl/SecureRandom/FloatTest.php
2020-07-16 17:13:12 +01:00

21 lines
390 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\SecureRandom;
use PHPUnit\Framework\TestCase;
use Psl\SecureRandom;
class FloatTest extends TestCase
{
public function testFloat(): void
{
$random = SecureRandom\float();
self::assertIsFloat($random);
self::assertGreaterThanOrEqual(0, $random);
self::assertLessThanOrEqual(1, $random);
}
}