function DefaultTableMappingTest::testGetFieldColumnName
Tests DefaultTableMapping::getFieldColumnName() with valid parameters.
@covers ::getFieldColumnName
      
    
@dataProvider providerTestGetFieldColumnName
Parameters
bool $base_field: Flag indicating whether the field should be treated as a base or bundle field.
string[] $columns: An array of available field column names.
string $column: The name of the column to be processed.
string $expected: The expected result.
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ DefaultTableMappingTest.php, line 280  
Class
- DefaultTableMappingTest
 - @coversDefaultClass \Drupal\Core\Entity\Sql\DefaultTableMapping[[api-linebreak]] @group Entity
 
Namespace
Drupal\Tests\Core\Entity\SqlCode
public function testGetFieldColumnName($base_field, $columns, $column, $expected) {
  $definitions['test'] = $this->setUpDefinition('test', $columns, $base_field);
  $table_mapping = new TestDefaultTableMapping($this->entityType, $definitions);
  $result = $table_mapping->getFieldColumnName($definitions['test'], $column);
  $this->assertEquals($expected, $result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.