endtoend-test-psl/tests/Psl/Random/FloatTest.php

21 lines
372 B
PHP
Raw Normal View History

2019-12-24 01:52:07 +01:00
<?php
declare(strict_types=1);
namespace Psl\Tests\Random;
use PHPUnit\Framework\TestCase;
2019-12-25 19:11:35 +01:00
use Psl\Random;
2019-12-24 01:52:07 +01:00
class FloatTest extends TestCase
{
2019-12-25 19:11:35 +01:00
public function testFloat(): void
{
$random = Random\float();
self::assertIsFloat($random);
self::assertGreaterThanOrEqual(0, $random);
self::assertLessThanOrEqual(1, $random);
}
2019-12-24 01:52:07 +01:00
}