 957cb62dab
			
		
	
	
		957cb62dab
		
			
		
	
	
	
	
		
			
			This had been intended to get 100% coverage for TextData functions, and it does that. However, some minor bugs requiring source changes arose during testing. - the Excel CHAR function restricts its argument to 1-255. PhpSpreadsheet CHARACTER had been allowing 0+. Also, there is no need to test if iconv exists, since it is part of Composer requirements. - The DOLLAR function had been returning NUM for invalid arguments. Excel returns VALUE. Also, negative amounts were not being handled correctly. - The FIXEDFORMAT function had been returning NUM for invalid arguments. Excel FIXED returns VALUE.
		
			
				
	
	
		
			63 lines
		
	
	
		
			774 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			774 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| return [
 | |
|     [
 | |
|         '123,456.79',
 | |
|         123456.789,
 | |
|         2,
 | |
|         false,
 | |
|     ],
 | |
|     [
 | |
|         '123456.8',
 | |
|         123456.789,
 | |
|         1,
 | |
|         true,
 | |
|     ],
 | |
|     [
 | |
|         '123456.79',
 | |
|         123456.789,
 | |
|         2,
 | |
|         true,
 | |
|     ],
 | |
|     [
 | |
|         '-123456.79',
 | |
|         -123456.789,
 | |
|         2,
 | |
|         true,
 | |
|     ],
 | |
|     [
 | |
|         '123500',
 | |
|         123456.789,
 | |
|         -2,
 | |
|         true,
 | |
|     ],
 | |
|     [
 | |
|         '123,500',
 | |
|         123456.789,
 | |
|         -2,
 | |
|     ],
 | |
|     [
 | |
|         '-123500',
 | |
|         -123456.789,
 | |
|         -2,
 | |
|         true,
 | |
|     ],
 | |
|     [
 | |
|         '-123,500',
 | |
|         -123456.789,
 | |
|         -2,
 | |
|     ],
 | |
|     [
 | |
|         '#VALUE!',
 | |
|         'ABC',
 | |
|         2,
 | |
|         null,
 | |
|     ],
 | |
|     [
 | |
|         '#VALUE!',
 | |
|         123.456,
 | |
|         'ABC',
 | |
|         null,
 | |
|     ],
 | |
| ];
 |