From d9cda3f287d9d6dc496a732b68814ce572d6fd3b Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Fri, 27 Mar 2015 21:28:26 +0000 Subject: [PATCH] Unit tests for default value binder --- .../PHPExcel/Cell/DefaultValueBinderTest.php | 33 +++++++++++++++++++ .../rawTestData/Cell/DefaultValueBinder.data | 19 +++++++++++ 2 files changed, 52 insertions(+) create mode 100644 unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php create mode 100644 unitTests/rawTestData/Cell/DefaultValueBinder.data diff --git a/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php b/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php new file mode 100644 index 00000000..59b1dd04 --- /dev/null +++ b/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php @@ -0,0 +1,33 @@ +assertEquals($expectedResult, $result); + } + + public function providerDataTypeForValue() + { + return new testDataFileIterator('rawTestData/Cell/DefaultValueBinder.data'); + } + +} diff --git a/unitTests/rawTestData/Cell/DefaultValueBinder.data b/unitTests/rawTestData/Cell/DefaultValueBinder.data new file mode 100644 index 00000000..446ded6c --- /dev/null +++ b/unitTests/rawTestData/Cell/DefaultValueBinder.data @@ -0,0 +1,19 @@ +NULL, "null" +, "null" +"#NULL!", "e" +FALSE, "b" +TRUE, "b" +"FALSE", "s" +"TRUE", "s" +"", "s" +"ABC", "s" +"123", "n" +123, "n" +0.123, "n" +"-123", "n" +"1.23E4", "n" +"-1.23E4", "n" +"1.23E-4", "n" +"000123", "s" +"=123", "f" +"#DIV/0!", "e"