/** * Render header labels for the CSV output. * * @param Fields $fields * @param CsvCell $csvCell * @return array */ protected function renderHeader(Fields $fields, CsvCell $csvCell) { $header = []; foreach ($fields as $field) { $header[] = $csvCell->getHeaderRenderer()->render($field); } return $header; }
public function testUsage() { $this->assertInstanceOf('\\Dewdrop\\Fields\\Helper\\CsvCell\\Content', $this->csvCellFieldsHelper->getContentRenderer()); $this->assertInstanceOf('\\Dewdrop\\Fields\\Helper\\CsvCell\\Header', $this->csvCellFieldsHelper->getHeaderRenderer()); }