 aef4d711f5
			
		
	
	
		aef4d711f5
		
			
		
	
	
	
	
		
			
			Because even if it doesn't make a difference in practice, it is technically more correct to call static methods statically. It also better advertise that those methods can be used from any context.
		
			
				
	
	
		
			33 lines
		
	
	
		
			797 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			797 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace PhpOffice\PhpSpreadsheetTests\Style;
 | |
| 
 | |
| use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
 | |
| use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
 | |
| use PHPUnit_Framework_TestCase;
 | |
| 
 | |
| class NumberFormatTest extends PHPUnit_Framework_TestCase
 | |
| {
 | |
|     public function setUp()
 | |
|     {
 | |
|         StringHelper::setDecimalSeparator('.');
 | |
|         StringHelper::setThousandsSeparator(',');
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @dataProvider providerNumberFormat
 | |
|      *
 | |
|      * @param mixed $expectedResult
 | |
|      */
 | |
|     public function testFormatValueWithMask($expectedResult, ...$args)
 | |
|     {
 | |
|         $result = NumberFormat::toFormattedString(...$args);
 | |
|         self::assertEquals($expectedResult, $result);
 | |
|     }
 | |
| 
 | |
|     public function providerNumberFormat()
 | |
|     {
 | |
|         return require 'data/Style/NumberFormat.php';
 | |
|     }
 | |
| }
 |