diff options
author | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-01-28 12:03:14 +0100 |
---|---|---|
committer | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-01-28 12:03:14 +0100 |
commit | 08802ef10cc607484a7efe2a02bf2a521abf3b7e (patch) | |
tree | 44693064ab4de21b54e18e53892dabdf42ad940d /test/WriterTest.php | |
parent | b2167534b7c23cad4567a0d59d543d2a2540eb8d (diff) | |
download | csv-08802ef10cc607484a7efe2a02bf2a521abf3b7e.zip csv-08802ef10cc607484a7efe2a02bf2a521abf3b7e.tar.gz csv-08802ef10cc607484a7efe2a02bf2a521abf3b7e.tar.bz2 |
improve new Features
Diffstat (limited to 'test/WriterTest.php')
-rw-r--r-- | test/WriterTest.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/WriterTest.php b/test/WriterTest.php index d4dd0ef..22f1137 100644 --- a/test/WriterTest.php +++ b/test/WriterTest.php @@ -119,7 +119,7 @@ class WriterTest extends PHPUnit_Framework_TestCase ['john', null, 'john.doe@example.com'], ]; $this->csv->setNullHandlingMode(Writer::NULL_AS_EMPTY); - $this->csv->setCellContentValidation(false); + $this->csv->useFormatValidation(false); $this->csv->insertAll($expected); $iterator = new LimitIterator($this->csv->getIterator(), 2, 1); @@ -243,4 +243,13 @@ class WriterTest extends PHPUnit_Framework_TestCase $csv->insertOne(["jane", "doe"]); $this->assertSame("jane,doe\r\n", (string) $csv); } + + public function testCustomNewlineFromCreateFromString() + { + $expected = "\r\n"; + $raw = "john,doe,john.doe@example.com".PHP_EOL + ."jane,doe,jane.doe@example.com".PHP_EOL; + $csv = Writer::createFromString($raw, $expected); + $this->assertSame($expected, $csv->getNewline()); + } } |