32 lines
766 B
PHP
32 lines
766 B
PHP
|
<?php
|
||
|
|
||
|
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Engineering;
|
||
|
|
||
|
use PhpOffice\PhpSpreadsheet\Calculation\Engineering;
|
||
|
use PhpOffice\PhpSpreadsheet\Calculation\Functions;
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
|
||
|
class Bin2DecTest extends TestCase
|
||
|
{
|
||
|
public function setUp()
|
||
|
{
|
||
|
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @dataProvider providerBIN2DEC
|
||
|
*
|
||
|
* @param mixed $expectedResult
|
||
|
*/
|
||
|
public function testBIN2DEC($expectedResult, ...$args)
|
||
|
{
|
||
|
$result = Engineering::BINTODEC(...$args);
|
||
|
$this->assertEquals($expectedResult, $result);
|
||
|
}
|
||
|
|
||
|
public function providerBIN2DEC()
|
||
|
{
|
||
|
return require 'data/Calculation/Engineering/BIN2DEC.php';
|
||
|
}
|
||
|
}
|