diff --git a/migrate_source_csv/tests/src/Unit/CSVFileObjectTest.php b/migrate_source_csv/tests/src/Unit/CSVFileObjectTest.php index 2392aa9..74eff89 100644 --- a/migrate_source_csv/tests/src/Unit/CSVFileObjectTest.php +++ b/migrate_source_csv/tests/src/Unit/CSVFileObjectTest.php @@ -18,13 +18,18 @@ use org\bovigo\vfs\content\LargeFileContent; class CSVFileObjectTest extends CSVUnitTestCase { /** - * @var \Drupal\migrate_source_csv\CSVFileObject CSV file object. + * The CSV file object. + * + * @var \Drupal\migrate_source_csv\CSVFileObject */ - protected $csv_file_object; + protected $csvFileObject; + /** + * {@inheritdoc} + */ protected function setUp() { parent::setUp(); - $this->csv_file_object = new CSVFileObject($this->happyPath); + $this->csvFileObject = new CSVFileObject($this->happyPath); } /** @@ -35,9 +40,9 @@ class CSVFileObjectTest extends CSVUnitTestCase { * @covers ::__construct */ public function create() { - $this->assertInstanceOf(CSVFileObject::class, $this->csv_file_object); + $this->assertInstanceOf(CSVFileObject::class, $this->csvFileObject); $flags = CSVFileObject::READ_CSV | CSVFileObject::READ_AHEAD | CSVFileObject::DROP_NEW_LINE | CSVFileObject::SKIP_EMPTY; - $this->assertSame($flags, $this->csv_file_object->getFlags()); + $this->assertSame($flags, $this->csvFileObject->getFlags()); } /** @@ -49,9 +54,9 @@ class CSVFileObjectTest extends CSVUnitTestCase { */ public function setHeaderRowCount() { $expected = 2; - $this->csv_file_object->setHeaderRowCount($expected); + $this->csvFileObject->setHeaderRowCount($expected); - return $this->csv_file_object->getHeaderRowCount(); + return $this->csvFileObject->getHeaderRowCount(); } /** @@ -77,8 +82,8 @@ class CSVFileObjectTest extends CSVUnitTestCase { */ public function countLines() { $expected = 15; - $this->csv_file_object->setHeaderRowCount(1); - $actual = $this->csv_file_object->count(); + $this->csvFileObject->setHeaderRowCount(1); + $actual = $this->csvFileObject->count(); $this->assertEquals($expected, $actual); } @@ -115,7 +120,7 @@ class CSVFileObjectTest extends CSVUnitTestCase { '60.242.130.40', ); - $csv_file_object = $this->csv_file_object; + $csv_file_object = $this->csvFileObject; $csv_file_object->rewind(); $current = $csv_file_object->current(); $this->assertArrayEquals($columns, $current);