public function CsvParserTest::testAlternateSeparator in Feeds 8.3
Tests using an asterisk as delimiter.
File
- tests/
src/ Unit/ Component/ CsvParserTest.php, line 95
Class
- CsvParserTest
- @coversDefaultClass \Drupal\feeds\Component\CsvParser @group feeds
Namespace
Drupal\Tests\feeds\Unit\ComponentCode
public function testAlternateSeparator() {
// This implicitly tests lines without a newline.
$parser = CsvParser::createFromString("a*b*c")
->setDelimiter('*');
$this
->assertSame([
'a',
'b',
'c',
], iterator_to_array($parser)[0]);
}