mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-02 17:56:09 +01:00
50 lines
773 B
PHP
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
|
|
]
|
|
];
|
|
}
|
|
}
|