PhpSpreadsheet/unitTests/Classes/src/Style/NumberFormatDateTest.php

31 lines
772 B
PHP
Raw Normal View History

<?php
require_once 'testDataFileIterator.php';
class NumberFormatDateTest extends PHPUnit_Framework_TestCase
{
public function setUp()
{
2016-03-22 14:19:00 +00:00
\PHPExcel\Shared\String::setDecimalSeparator('.');
\PHPExcel\Shared\String::setThousandsSeparator(',');
}
/**
* @dataProvider providerNumberFormat
*/
public function testFormatValueWithMask()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Style_NumberFormat','toFormattedString'), $args);
$this->assertEquals($expectedResult, $result);
}
public function providerNumberFormat()
{
return new testDataFileIterator('rawTestData/Style/NumberFormatDates.data');
}
}