Skip to content

Commit

Permalink
Add failing test when using use_first_row_as_header with skip_to_row
Browse files Browse the repository at this point in the history
  • Loading branch information
ppetrov committed Oct 6, 2017
1 parent 6fe33c3 commit 80ab9a2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/CsvFileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ function test_with_head_row_and_custom_mappings() {
$this->assertEquals($this->get_expected_result_custom_columns(), $csv->to_array());
}

function test_with_head_row_and_skip_to_initial_row() {
$csv = new CsvFile(__DIR__ . '/sample-data/info.csv');
$csv->use_first_row_as_header();
$csv->skip_to_row(0);

$this->assertEquals($this->get_expected_result_actual_columns(), $csv->to_array());
}

function test_skip_rows() {
$csv = new CsvFile(__DIR__ . '/sample-data/info.csv');
$csv->skip_to_row(1);
Expand Down

0 comments on commit 80ab9a2

Please sign in to comment.