32 lines
776 B
PHP
32 lines
776 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\MathTrig;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
use PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class MMultTest extends TestCase
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider providerMMULT
|
|
*
|
|
* @param mixed $expectedResult
|
|
*/
|
|
public function testMMULT($expectedResult, ...$args): void
|
|
{
|
|
$result = MathTrig::MMULT(...$args);
|
|
self::assertEqualsWithDelta($expectedResult, $result, 1E-8);
|
|
}
|
|
|
|
public function providerMMULT()
|
|
{
|
|
return require 'tests/data/Calculation/MathTrig/MMULT.php';
|
|
}
|
|
}
|