PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/MathTrig/AsinhTest.php

27 lines
740 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\MathTrig;
class AsinhTest extends AllSetupTeardown
{
/**
* @dataProvider providerAsinh
*
* @param mixed $expectedResult
*/
public function testAsinh($expectedResult, string $formula): void
{
$this->mightHaveException($expectedResult);
$sheet = $this->sheet;
$sheet->getCell('A2')->setValue(0.5);
$sheet->getCell('A1')->setValue("=ASINH($formula)");
$result = $sheet->getCell('A1')->getCalculatedValue();
self::assertEqualsWithDelta($expectedResult, $result, 1E-6);
}
public function providerAsinh()
{
return require 'tests/data/Calculation/MathTrig/ASINH.php';
}
}