mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2024-12-12 17:17:25 +01:00
50 lines
765 B
PHP
50 lines
765 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Psl\Tests\Math;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Psl\Math;
|
|
|
|
class CeilTest extends TestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideData
|
|
*/
|
|
public function testCiel(float $expected, float $number): void
|
|
{
|
|
self::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
|
|
]
|
|
];
|
|
}
|
|
}
|