function DefaultTableMappingTest::providerTestGetFieldColumnName
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldColumnName()
- 10 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldColumnName()
- 11.x core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::providerTestGetFieldColumnName()
Provides test data for testGetFieldColumnName().
Return value
array[] An nested array where each inner array has the following values: test field name, base field status, list of field columns, name of the column to be retrieved, expected result, whether an exception is expected.
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ DefaultTableMappingTest.php, line 325
Class
- DefaultTableMappingTest
- @coversDefaultClass \Drupal\Core\Entity\Sql\DefaultTableMapping @group Entity
Namespace
Drupal\Tests\Core\Entity\SqlCode
public function providerTestGetFieldColumnName() {
$data = [];
// Base field with single column.
$data[] = [
TRUE,
[
'foo',
],
'foo',
'test',
];
// Base field with multiple columns.
$data[] = [
TRUE,
[
'foo',
'bar',
],
'foo',
'test__foo',
];
$data[] = [
TRUE,
[
'foo',
'bar',
],
'bar',
'test__bar',
];
// Bundle field with single column.
$data[] = [
FALSE,
[
'foo',
],
'foo',
'test_foo',
];
// Bundle field with multiple columns.
$data[] = [
FALSE,
[
'foo',
'bar',
],
'foo',
'test_foo',
];
$data[] = [
FALSE,
[
'foo',
'bar',
],
'bar',
'test_bar',
];
// Bundle field with reserved column.
$data[] = [
FALSE,
[
'foo',
'bar',
],
'deleted',
'deleted',
];
return $data;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.