public function testConstructor()
 {
     $dbField = new DbField('field', 'string', 255, true, true, true);
     $this->assertEquals('field', $dbField->getName(), "Field name was not properly set");
     $this->assertEquals('string', $dbField->getType(), "Field type was not properly set");
     $this->assertEquals(255, $dbField->getLimit(), "Field limit was not properly set");
     $this->assertTrue($dbField->getRequired(), "Field required was not properly set");
     $this->assertTrue($dbField->getNonSearchable(), "Field non-searchable was not properly set");
     $this->assertTrue($dbField->getUnique(), "Field unique was not properly set");
 }
 /**
  * Method used for updating an existing DB table column.
  *
  * @param  \CsvMigrations\FieldHandlers\DbField $dbField DbField object
  * @return void
  */
 protected function _updateColumn(DbField $dbField)
 {
     $this->_table->changeColumn($dbField->getName(), $dbField->getType(), $dbField->getOptions());
     // set field as unique
     if ($dbField->getUnique()) {
         $this->_table->addIndex([$dbField->getName()], ['unique' => $dbField->getUnique()]);
     }
 }