Skip to content

Commit

Permalink
Adding test for #421
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Apr 17, 2021
1 parent d5de5a3 commit cf8acf1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ All Notable changes to `Csv` will be documented in this file

### Fixed

- None
- fix writer filter [#421](https://github.com/thephpleague/csv/pull/421) by [LosingBattle](https://github.com/cpj555)

### Removed

Expand Down
11 changes: 10 additions & 1 deletion src/EncloseFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,16 @@ public function testEncloseAll(): void
EncloseField::addTo($csv, "\t\x1f");
self::assertContains(EncloseField::getFiltername(), stream_get_filters());
$csv->insertAll($this->records);
self::assertStringContainsString('"Grand Cherokee"', $csv->getContent());
$expected = <<<CSV
"Year"|"Make"|"Model"|"Description"|"Price"
"1997"|"Ford"|"E350"|"ac,abs,moon"|"3000.00"
"1999"|"Chevy"|"Venture ""Extended Edition"""|""|"4900.00"
"1999"|"Chevy"|"Venture ""Extended Edition, Very Large"""|""|"5000.00"
"1996"|"Jeep"|"Grand Cherokee"|"MUST SELL!
air, moon roof, loaded"|"4799.00"
CSV;
self::assertStringContainsString($expected, $csv->toString());
}

/**
Expand Down

0 comments on commit cf8acf1

Please sign in to comment.