PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Statistical/CorrelTest.php
Mark Baker 554684720d
Statistical issues (#1098)
* Merge branch 'master' of C:\Projects\PHPOffice\PHPSpreadsheet\develop with conflicts.

* Adjusted logic for COUNT() function to handle differences in EXCEL, GNUMERIC and OPENOFFICE modes for cells and for literal values

* Fix case-sensitivity in filenames

* Appeasing Codesniffer

* Resolve COUNTA() differences between cell values and literals

* Style fixes

* Start refactoring statistical function tests into individual tests rather than having a single, giant test for all statistical functions.... first step toward doing this for all tests

* More refactoring into separate tests
If all functions have their own individual test files, it should be a lot easier to identify which functions aren't covered by tests yet

* Missing last lines in files
2019-07-20 18:40:05 +02:00

32 lines
793 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
use PHPUnit\Framework\TestCase;
class CorrelTest extends TestCase
{
public function setUp()
{
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
}
/**
* @dataProvider providerCORREL
*
* @param mixed $expectedResult
*/
public function testCORREL($expectedResult, array $xargs, array $yargs)
{
$result = Statistical::CORREL($xargs, $yargs);
self::assertEquals($expectedResult, $result, '', 1E-12);
}
public function providerCORREL()
{
return require 'data/Calculation/Statistical/CORREL.php';
}
}