// The storage definitions are only used in getColumnNames() so we do not
// need to provide any here.
$table_mapping =
new TestDefaultTableMapping($this->entityType,
[]);
$this->
assertSame([],
$table_mapping->
getTableNames());
$table_mapping->
setFieldNames('foo',
[]);
$this->
assertSame(['foo'
],
$table_mapping->
getTableNames());
$table_mapping->
setFieldNames('bar',
[]);
$this->
assertSame(['foo', 'bar'
],
$table_mapping->
getTableNames());
$table_mapping->
setExtraColumns('baz',
[]);
$this->
assertSame(['foo', 'bar', 'baz'
],
$table_mapping->
getTableNames());
// Test that table names are not duplicated.
$table_mapping->
setExtraColumns('foo',
[]);
$this->
assertSame(['foo', 'bar', 'baz'
],
$table_mapping->
getTableNames());
} /**
* Tests DefaultTableMapping::getAllColumns().
*
* @covers ::__construct
* @covers ::getAllColumns
* @covers ::getFieldNames
* @covers ::getColumnNames
* @covers ::setFieldNames
* @covers ::getExtraColumns
* @covers ::setExtraColumns
*/