diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-10-12 14:44:28 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-10-12 14:44:28 -0400 |
commit | e515f37435db6cf883215f13f02391d8b2107d47 (patch) | |
tree | 3df01bc0c420a2c497302c5a38aa9d724b2e764c /tests/units/Core/CsvTest.php | |
parent | e57386a18393e85f073cccff70699ad9afc19119 (diff) |
Add user CSV import
Diffstat (limited to 'tests/units/Core/CsvTest.php')
-rw-r--r-- | tests/units/Core/CsvTest.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/units/Core/CsvTest.php b/tests/units/Core/CsvTest.php new file mode 100644 index 00000000..1534584e --- /dev/null +++ b/tests/units/Core/CsvTest.php @@ -0,0 +1,22 @@ +<?php + +require_once __DIR__.'/../Base.php'; + +use Core\Csv; + +class CsvTest extends Base +{ + public function testGetBooleanValue() + { + $this->assertEquals(1, Csv::getBooleanValue('1')); + $this->assertEquals(1, Csv::getBooleanValue('True')); + $this->assertEquals(1, Csv::getBooleanValue('t')); + $this->assertEquals(1, Csv::getBooleanValue('TRUE')); + $this->assertEquals(1, Csv::getBooleanValue('true')); + $this->assertEquals(1, Csv::getBooleanValue('T')); + + $this->assertEquals(0, Csv::getBooleanValue('0')); + $this->assertEquals(0, Csv::getBooleanValue('123')); + $this->assertEquals(0, Csv::getBooleanValue('anything')); + } +} |