diff options
Diffstat (limited to 'test/WriterTest.php')
-rw-r--r-- | test/WriterTest.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/WriterTest.php b/test/WriterTest.php index 06e2db7..1cc07e7 100644 --- a/test/WriterTest.php +++ b/test/WriterTest.php @@ -111,7 +111,7 @@ class WriterTest extends PHPUnit_Framework_TestCase $this->assertSame(['john', '', 'john.doe@example.com'], $res); } - public function testInsertWithoutValidation() + public function testInsertWithoutNullHandlingMode() { $expected = [ ['john', 'doe', 'john.doe@example.com'], @@ -128,6 +128,21 @@ class WriterTest extends PHPUnit_Framework_TestCase } /** + * @expectedException PHPUnit_Framework_Error + */ + public function testInsertWithoutValidation() + { + $expected = [ + ['john', 'doe', 'john.doe@example.com'], + 'john,doe,john.doe@example.com', + ['john', null, 'john.doe@example.com'], + new \StdClass, + ]; + $this->csv->useValidation(false); + $this->csv->insertAll($expected); + } + + /** * @expectedException InvalidArgumentException * @expectedExceptionMessage */ |