Skip to content

Commit cf8acf1

Browse files
committed
Adding test for #421
1 parent d5de5a3 commit cf8acf1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ All Notable changes to `Csv` will be documented in this file
1414

1515
### Fixed
1616

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

1919
### Removed
2020

src/EncloseFieldTest.php

+10-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ public function testEncloseAll(): void
5050
EncloseField::addTo($csv, "\t\x1f");
5151
self::assertContains(EncloseField::getFiltername(), stream_get_filters());
5252
$csv->insertAll($this->records);
53-
self::assertStringContainsString('"Grand Cherokee"', $csv->getContent());
53+
$expected = <<<CSV
54+
"Year"|"Make"|"Model"|"Description"|"Price"
55+
"1997"|"Ford"|"E350"|"ac,abs,moon"|"3000.00"
56+
"1999"|"Chevy"|"Venture ""Extended Edition"""|""|"4900.00"
57+
"1999"|"Chevy"|"Venture ""Extended Edition, Very Large"""|""|"5000.00"
58+
"1996"|"Jeep"|"Grand Cherokee"|"MUST SELL!
59+
air, moon roof, loaded"|"4799.00"
60+
61+
CSV;
62+
self::assertStringContainsString($expected, $csv->toString());
5463
}
5564

5665
/**

0 commit comments

Comments
 (0)