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

21 lines
402 B
PHP

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