554684720d
* 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
32 lines
769 B
PHP
32 lines
769 B
PHP
<?php
|
|
|
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Statistical;
|
|
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
|
use PhpOffice\PhpSpreadsheet\Calculation\Statistical;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class CountATest extends TestCase
|
|
{
|
|
public function setUp()
|
|
{
|
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider providerCOUNTA
|
|
*
|
|
* @param mixed $expectedResult
|
|
*/
|
|
public function testCOUNTA($expectedResult, ...$args)
|
|
{
|
|
$result = Statistical::COUNTA(...$args);
|
|
self::assertEquals($expectedResult, $result, '', 1E-12);
|
|
}
|
|
|
|
public function providerCOUNTA()
|
|
{
|
|
return require 'data/Calculation/Statistical/COUNTA.php';
|
|
}
|
|
}
|