 8dddf56c2e
			
		
	
	
		8dddf56c2e
		
			
		
	
	
	
	
		
			
			This simplify code, increase readability and improve the function signature for API users.
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace PhpOffice\PhpSpreadsheetTests\Calculation;
 | |
| 
 | |
| use PhpOffice\PhpSpreadsheet\Calculation\Functions;
 | |
| use PhpOffice\PhpSpreadsheet\Calculation\LookupRef;
 | |
| 
 | |
| /**
 | |
|  * Class LookupRefTest.
 | |
|  */
 | |
| class LookupRefTest extends \PHPUnit_Framework_TestCase
 | |
| {
 | |
|     public function setUp()
 | |
|     {
 | |
|         Functions::setCompatibilityMode(Functions::COMPATIBILITY_EXCEL);
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @dataProvider providerHLOOKUP
 | |
|      * @group fail19
 | |
|      *
 | |
|      * @param mixed $expectedResult
 | |
|      */
 | |
|     public function testHLOOKUP($expectedResult, ...$args)
 | |
|     {
 | |
|         $result = LookupRef::HLOOKUP(...$args);
 | |
|         $this->assertEquals($expectedResult, $result);
 | |
|     }
 | |
| 
 | |
|     public function providerHLOOKUP()
 | |
|     {
 | |
|         return require 'data/Calculation/LookupRef/HLOOKUP.php';
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @dataProvider providerVLOOKUP
 | |
|      * @group fail19
 | |
|      *
 | |
|      * @param mixed $expectedResult
 | |
|      */
 | |
|     public function testVLOOKUP($expectedResult, ...$args)
 | |
|     {
 | |
|         $result = LookupRef::VLOOKUP(...$args);
 | |
|         $this->assertEquals($expectedResult, $result);
 | |
|     }
 | |
| 
 | |
|     public function providerVLOOKUP()
 | |
|     {
 | |
|         return require 'data/Calculation/LookupRef/VLOOKUP.php';
 | |
|     }
 | |
| }
 |