PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/EngineeringTest.php

685 lines
19 KiB
PHP
Raw Normal View History

2012-07-31 20:56:11 +00:00
<?php
namespace PhpSpreadsheetTests\Calculation;
2012-07-31 20:56:11 +00:00
use PhpSpreadsheet\Calculation\Engineering;
use PhpSpreadsheet\Calculation\Functions;
2016-03-22 14:35:50 +00:00
class EngineeringTest extends \PHPUnit_Framework_TestCase
2012-07-31 20:56:11 +00:00
{
/**
* @var \PhpSpreadsheetTests\Custom\ComplexAssert
*/
protected $complexAssert;
2012-07-31 20:56:11 +00:00
public function setUp()
{
$this->complexAssert = new \PhpSpreadsheetTests\Custom\ComplexAssert();
Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function tearDown()
{
$this->complexAssert = null;
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBESSELI
*/
2015-05-17 13:00:02 +00:00
public function testBESSELI()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BESSELI'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerBESSELI()
{
return require 'data/Calculation/Engineering/BESSELI.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBESSELJ
*/
2015-05-17 13:00:02 +00:00
public function testBESSELJ()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BESSELJ'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerBESSELJ()
{
return require 'data/Calculation/Engineering/BESSELJ.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBESSELK
*/
2015-05-17 13:00:02 +00:00
public function testBESSELK()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BESSELK'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerBESSELK()
{
return require 'data/Calculation/Engineering/BESSELK.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBESSELY
*/
2015-05-17 13:00:02 +00:00
public function testBESSELY()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BESSELY'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerBESSELY()
{
return require 'data/Calculation/Engineering/BESSELY.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerCOMPLEX
*/
2015-05-17 13:00:02 +00:00
public function testCOMPLEX()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'COMPLEX'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
2012-07-31 20:56:11 +00:00
public function providerCOMPLEX()
{
return require 'data/Calculation/Engineering/COMPLEX.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMAGINARY
*/
2015-05-17 13:00:02 +00:00
public function testIMAGINARY()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMAGINARY'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerIMAGINARY()
{
return require 'data/Calculation/Engineering/IMAGINARY.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMREAL
*/
2015-05-17 13:00:02 +00:00
public function testIMREAL()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMREAL'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerIMREAL()
{
return require 'data/Calculation/Engineering/IMREAL.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMABS
*/
2015-05-17 13:00:02 +00:00
public function testIMABS()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMABS'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerIMABS()
{
return require 'data/Calculation/Engineering/IMABS.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMARGUMENT
* @group fail19
2012-07-31 20:56:11 +00:00
*/
2015-05-17 13:00:02 +00:00
public function testIMARGUMENT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMARGUMENT'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-8);
}
2012-07-31 20:56:11 +00:00
public function providerIMARGUMENT()
{
return require 'data/Calculation/Engineering/IMARGUMENT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMCONJUGATE
*/
2015-05-17 13:00:02 +00:00
public function testIMCONJUGATE()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMCONJUGATE'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMCONJUGATE()
{
return require 'data/Calculation/Engineering/IMCONJUGATE.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMCOS
*/
2015-05-17 13:00:02 +00:00
public function testIMCOS()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMCOS'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMCOS()
{
return require 'data/Calculation/Engineering/IMCOS.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMDIV
* @group fail19
2012-07-31 20:56:11 +00:00
*/
2015-05-17 13:00:02 +00:00
public function testIMDIV()
{
$this->markTestIncomplete('TODO: This test should be fixed');
2015-05-17 13:00:02 +00:00
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMDIV'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMDIV()
{
return require 'data/Calculation/Engineering/IMDIV.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMEXP
*/
2015-05-17 13:00:02 +00:00
public function testIMEXP()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMEXP'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMEXP()
{
return require 'data/Calculation/Engineering/IMEXP.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMLN
*/
2015-05-17 13:00:02 +00:00
public function testIMLN()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMLN'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMLN()
{
return require 'data/Calculation/Engineering/IMLN.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMLOG2
*/
2015-05-17 13:00:02 +00:00
public function testIMLOG2()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMLOG2'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMLOG2()
{
return require 'data/Calculation/Engineering/IMLOG2.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMLOG10
*/
2015-05-17 13:00:02 +00:00
public function testIMLOG10()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMLOG10'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMLOG10()
{
return require 'data/Calculation/Engineering/IMLOG10.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMPOWER
* @group fail19
2012-07-31 20:56:11 +00:00
*/
2015-05-17 13:00:02 +00:00
public function testIMPOWER()
{
$this->markTestIncomplete('TODO: This test should be fixed');
2015-05-17 13:00:02 +00:00
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMPOWER'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMPOWER()
{
return require 'data/Calculation/Engineering/IMPOWER.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMPRODUCT
*/
2015-05-17 13:00:02 +00:00
public function testIMPRODUCT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMPRODUCT'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMPRODUCT()
{
return require 'data/Calculation/Engineering/IMPRODUCT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMSIN
*/
2015-05-17 13:00:02 +00:00
public function testIMSIN()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMSIN'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMSIN()
{
return require 'data/Calculation/Engineering/IMSIN.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMSQRT
*/
2015-05-17 13:00:02 +00:00
public function testIMSQRT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMSQRT'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMSQRT()
{
return require 'data/Calculation/Engineering/IMSQRT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMSUB
* @group fail19
2012-07-31 20:56:11 +00:00
*/
2015-05-17 13:00:02 +00:00
public function testIMSUB()
{
$this->markTestIncomplete('TODO: This test should be fixed');
2015-05-17 13:00:02 +00:00
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMSUB'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMSUB()
{
return require 'data/Calculation/Engineering/IMSUB.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerIMSUM
* @group fail19
2012-07-31 20:56:11 +00:00
*/
2015-05-17 13:00:02 +00:00
public function testIMSUM()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'IMSUM'], $args);
$this->assertTrue($this->complexAssert->assertComplexEquals($expectedResult, $result, 1E-8), $this->complexAssert->getErrorMessage());
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
public function providerIMSUM()
{
return require 'data/Calculation/Engineering/IMSUM.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerERF
*/
2015-05-17 13:00:02 +00:00
public function testERF()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'ERF'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
2012-07-31 20:56:11 +00:00
public function providerERF()
{
return require 'data/Calculation/Engineering/ERF.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerERFC
*/
2015-05-17 13:00:02 +00:00
public function testERFC()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'ERFC'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null, 1E-12);
}
2012-07-31 20:56:11 +00:00
public function providerERFC()
{
return require 'data/Calculation/Engineering/ERFC.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBIN2DEC
*/
2015-05-17 13:00:02 +00:00
public function testBIN2DEC()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BINTODEC'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
2012-07-31 20:56:11 +00:00
public function providerBIN2DEC()
{
return require 'data/Calculation/Engineering/BIN2DEC.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBIN2HEX
*/
2015-05-17 13:00:02 +00:00
public function testBIN2HEX()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BINTOHEX'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
2012-07-31 20:56:11 +00:00
public function providerBIN2HEX()
{
return require 'data/Calculation/Engineering/BIN2HEX.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerBIN2OCT
*/
2015-05-17 13:00:02 +00:00
public function testBIN2OCT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'BINTOOCT'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result);
}
2012-07-31 20:56:11 +00:00
public function providerBIN2OCT()
{
return require 'data/Calculation/Engineering/BIN2OCT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerDEC2BIN
*/
2015-05-17 13:00:02 +00:00
public function testDEC2BIN()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'DECTOBIN'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerDEC2BIN()
{
return require 'data/Calculation/Engineering/DEC2BIN.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerDEC2HEX
*/
2015-05-17 13:00:02 +00:00
public function testDEC2HEX()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'DECTOHEX'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerDEC2HEX()
{
return require 'data/Calculation/Engineering/DEC2HEX.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerDEC2OCT
*/
2015-05-17 13:00:02 +00:00
public function testDEC2OCT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'DECTOOCT'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerDEC2OCT()
{
return require 'data/Calculation/Engineering/DEC2OCT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerHEX2BIN
*/
2015-05-17 13:00:02 +00:00
public function testHEX2BIN()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'HEXTOBIN'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerHEX2BIN()
{
return require 'data/Calculation/Engineering/HEX2BIN.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerHEX2DEC
*/
2015-05-17 13:00:02 +00:00
public function testHEX2DEC()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'HEXTODEC'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerHEX2DEC()
{
return require 'data/Calculation/Engineering/HEX2DEC.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerHEX2OCT
*/
2015-05-17 13:00:02 +00:00
public function testHEX2OCT()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'HEXTOOCT'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerHEX2OCT()
{
return require 'data/Calculation/Engineering/HEX2OCT.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerOCT2BIN
*/
2015-05-17 13:00:02 +00:00
public function testOCT2BIN()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'OCTTOBIN'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerOCT2BIN()
{
return require 'data/Calculation/Engineering/OCT2BIN.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerOCT2DEC
*/
2015-05-17 13:00:02 +00:00
public function testOCT2DEC()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'OCTTODEC'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerOCT2DEC()
{
return require 'data/Calculation/Engineering/OCT2DEC.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerOCT2HEX
*/
2015-05-17 13:00:02 +00:00
public function testOCT2HEX()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'OCTTOHEX'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerOCT2HEX()
{
return require 'data/Calculation/Engineering/OCT2HEX.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerDELTA
*/
2015-05-17 13:00:02 +00:00
public function testDELTA()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'DELTA'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerDELTA()
{
return require 'data/Calculation/Engineering/DELTA.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerGESTEP
*/
2015-05-17 13:00:02 +00:00
public function testGESTEP()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'GESTEP'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerGESTEP()
{
return require 'data/Calculation/Engineering/GESTEP.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
2015-05-17 13:00:02 +00:00
public function testGetConversionGroups()
{
$result = Engineering::getConversionGroups();
2015-05-17 13:00:02 +00:00
$this->assertInternalType('array', $result);
}
2012-07-31 20:56:11 +00:00
2015-05-17 13:00:02 +00:00
public function testGetConversionGroupUnits()
{
$result = Engineering::getConversionGroupUnits();
2015-05-17 13:00:02 +00:00
$this->assertInternalType('array', $result);
}
2012-07-31 20:56:11 +00:00
2015-05-17 13:00:02 +00:00
public function testGetConversionGroupUnitDetails()
{
$result = Engineering::getConversionGroupUnitDetails();
2015-05-17 13:00:02 +00:00
$this->assertInternalType('array', $result);
}
2012-07-31 20:56:11 +00:00
2015-05-17 13:00:02 +00:00
public function testGetConversionMultipliers()
{
$result = Engineering::getConversionMultipliers();
2015-05-17 13:00:02 +00:00
$this->assertInternalType('array', $result);
}
2012-07-31 20:56:11 +00:00
/**
* @dataProvider providerCONVERTUOM
*/
2015-05-17 13:00:02 +00:00
public function testCONVERTUOM()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array([Engineering::class, 'CONVERTUOM'], $args);
2015-05-17 13:00:02 +00:00
$this->assertEquals($expectedResult, $result, null);
}
2012-07-31 20:56:11 +00:00
public function providerCONVERTUOM()
{
return require 'data/Calculation/Engineering/CONVERTUOM.php';
2015-05-17 13:00:02 +00:00
}
2012-07-31 20:56:11 +00:00
}