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 OddTest extends TestCase
|
|
|
|
{
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider providerODD
|
|
|
|
*
|
|
|
|
* @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 testODD($expectedResult, $value)
|
2019-07-22 22:50:30 +00:00
|
|
|
{
|
2019-07-25 19:02:41 +00:00
|
|
|
$result = MathTrig::ODD($value);
|
2019-07-22 22:50:30 +00:00
|
|
|
$this->assertEquals($expectedResult, $result, '', 1E-12);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function providerODD()
|
|
|
|
{
|
|
|
|
return require 'data/Calculation/MathTrig/ODD.php';
|
|
|
|
}
|
|
|
|
}
|