2020-02-11 21:59:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\MathTrig;
|
|
|
|
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
|
|
|
|
class ArabicTest extends TestCase
|
|
|
|
{
|
2020-04-27 10:28:36 +00:00
|
|
|
protected function setUp(): void
|
2020-02-11 21:59:19 +00:00
|
|
|
{
|
|
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dataProvider providerARABIC
|
|
|
|
*
|
|
|
|
* @param mixed $expectedResult
|
|
|
|
* @param string $romanNumeral
|
|
|
|
*/
|
|
|
|
public function testARABIC($expectedResult, $romanNumeral)
|
|
|
|
{
|
|
|
|
$result = MathTrig::ARABIC($romanNumeral);
|
|
|
|
$this->assertEquals($expectedResult, $result);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function providerARABIC()
|
|
|
|
{
|
2020-05-17 09:35:55 +00:00
|
|
|
return require 'tests/data/Calculation/MathTrig/ARABIC.php';
|
2020-02-11 21:59:19 +00:00
|
|
|
}
|
|
|
|
}
|