endtoend-test-psl/tests/Psl/SecureRandom/FloatTest.php
2020-10-15 11:05:30 +02:00

21 lines
402 B
PHP

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