endtoend-test-psl/tests/Psl/Math/FloorTest.php
2019-12-26 21:03:29 +01:00

50 lines
771 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Math;
use PHPUnit\Framework\TestCase;
use Psl\Math;
class FloorTest extends TestCase
{
/**
* @dataProvider provideData
*/
public function testFloor(float $expected, float $number): void
{
self::assertSame($expected, Math\floor($number));
}
public function provideData(): array
{
return [
[
4,
4.3,
],
[
9,
9.9,
],
[
3,
Math\PI
],
[
-4,
-Math\PI
],
[
2,
Math\E
]
];
}
}