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