You are here

public function CSVFileObjectTest::create in Migrate Source CSV 8

Tests that the construction appropriately creates a CSVFileObject.

@test

@covers ::__construct

File

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

Class

CSVFileObjectTest
@coversDefaultClass \Drupal\migrate_source_csv\CSVFileObject

Namespace

Drupal\Tests\migrate_source_csv\Unit

Code

public function create() {
  $this
    ->assertInstanceOf(CSVFileObject::class, $this->csvFileObject);
  $flags = CSVFileObject::READ_CSV | CSVFileObject::READ_AHEAD | CSVFileObject::DROP_NEW_LINE | CSVFileObject::SKIP_EMPTY;
  $this
    ->assertSame($flags, $this->csvFileObject
    ->getFlags());
}