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

50 lines
773 B
PHP

<?php
declare(strict_types=1);
namespace Psl\Tests\Math;
use PHPUnit\Framework\TestCase;
use Psl\Math;
final class CeilTest extends TestCase
{
/**
* @dataProvider provideData
*/
public function testCiel(float $expected, float $number): void
{
static::assertSame($expected, Math\ceil($number));
}
public function provideData(): array
{
return [
[
5.0,
5.0
],
[
5.0,
4.8
],
[
0.0,
0.0
],
[
1.0,
0.4
],
[
-6.0,
-6.5
]
];
}
}