2019-07-22 22:50:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\MathTrig;
|
|
|
|
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class IntTest extends TestCase
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider providerINT
|
|
|
|
*
|
|
|
|
* @param mixed $expectedResult
|
2019-07-25 19:02:41 +00:00
|
|
|
* @param $value
|
2019-07-22 22:50:30 +00:00
|
|
|
*/
|
2019-07-25 19:02:41 +00:00
|
|
|
public function testINT($expectedResult, $value)
|
2019-07-22 22:50:30 +00:00
|
|
|
{
|
2019-07-25 19:02:41 +00:00
|
|
|
$result = MathTrig::INT($value);
|
2019-07-22 22:50:30 +00:00
|
|
|
$this->assertEquals($expectedResult, $result);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function providerINT()
|
|
|
|
{
|
|
|
|
return require 'data/Calculation/MathTrig/INT.php';
|
|
|
|
}
|
|
|
|
}
|