function DefaultTableMappingTest::testGetFieldTableNameInvalid
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::testGetFieldTableNameInvalid()
- 8.9.x core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::testGetFieldTableNameInvalid()
- 11.x core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::testGetFieldTableNameInvalid()
Tests DefaultTableMapping::getFieldTableName() with an invalid parameter.
@covers ::getFieldTableName
File
-
core/
tests/ Drupal/ Tests/ Core/ Entity/ Sql/ DefaultTableMappingTest.php, line 447
Class
- DefaultTableMappingTest
- @coversDefaultClass \Drupal\Core\Entity\Sql\DefaultTableMapping @group Entity
Namespace
Drupal\Tests\Core\Entity\SqlCode
public function testGetFieldTableNameInvalid() : void {
$table_mapping = new TestDefaultTableMapping($this->entityType, []);
$this->expectException(SqlContentEntityStorageException::class);
$this->expectExceptionMessage("Table information not available for the 'invalid_field_name' field.");
$table_mapping->getFieldTableName('invalid_field_name');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.