summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-01-28 10:22:44 +0100
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-01-28 10:22:44 +0100
commit12787f2a8968e4a95320e5d53c0445ae406ba72e (patch)
tree78b5cff114b0002dc8c3d2a66da0d57d6e624801 /test
parent1a389f1f5f23ceb3435ccc889842365b3883bd82 (diff)
downloadcsv-12787f2a8968e4a95320e5d53c0445ae406ba72e.zip
csv-12787f2a8968e4a95320e5d53c0445ae406ba72e.tar.gz
csv-12787f2a8968e4a95320e5d53c0445ae406ba72e.tar.bz2
adding the possibility to create a CSV from an object implementing the __toString method
Diffstat (limited to 'test')
-rw-r--r--test/Bakame/Csv/ReaderTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Bakame/Csv/ReaderTest.php b/test/Bakame/Csv/ReaderTest.php
index 1c8c33e..f4517dd 100644
--- a/test/Bakame/Csv/ReaderTest.php
+++ b/test/Bakame/Csv/ReaderTest.php
@@ -115,6 +115,14 @@ class ReaderTest extends PHPUnit_Framework_TestCase
$this->assertNull($res[0][2]);
}
+ /**
+ * @expectedException InvalidArgumentException
+ */
+ public function testFailCreateFromString()
+ {
+ Reader::createFromString(new \DateTime);
+ }
+
public function testFetchColCallback()
{
$func = function ($value) {