Handle General number format as non date (#221)

If the number format is set to General (id = 0), do no try to format the value as a date
This commit is contained in:
Adrien Loison committed 2016-05-19 09:40:12 -07:00
1 parent e9cd7a397e
commit 5a7c2c1262
2 files changed
+24 -2

No files matched your search

@@ -59,6 +59,16 @@ class StyleHelperTest extends \PHPUnit_Framework_TestCase
$this->assertFalse($shouldFormatAsDate);
}
/**
* @return void
*/
public function testShouldFormatNumericValueAsDateWithGeneralFormat()
{
$styleHelper = $this->getStyleHelperMock([[], ['applyNumberFormat' => true, 'numFmtId' => 0]]);
$shouldFormatAsDate = $styleHelper->shouldFormatNumericValueAsDate(1);
$this->assertFalse($shouldFormatAsDate);
}
/**
* @return void
*/