You are here

public function CSVFileObjectTest::countLines in Migrate Source CSV 8

Tests that line count is correct.

@test

@covers ::count

File

tests/src/Unit/CSVFileObjectTest.php, line 81
Code for CSVFileObjectTest.php.

Class

CSVFileObjectTest
@coversDefaultClass \Drupal\migrate_source_csv\CSVFileObject

Namespace

Drupal\Tests\migrate_source_csv\Unit

Code

public function countLines() {
  $expected = 15;
  $this->csvFileObject
    ->setHeaderRowCount(1);
  $actual = $this->csvFileObject
    ->count();
  $this
    ->assertEquals($expected, $actual);
}