You are here

public function DefaultTableMappingTest::testGetFieldTableNameInvalid in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest::testGetFieldTableNameInvalid()

Tests DefaultTableMapping::getFieldTableName() with an invalid parameter.

@expectedException \Drupal\Core\Entity\Sql\SqlContentEntityStorageException @expectedExceptionMessage Table information not available for the 'invalid_field_name' field.

@covers ::getFieldTableName

File

core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php, line 444
Contains \Drupal\Tests\Core\Entity\Sql\DefaultTableMappingTest.

Class

DefaultTableMappingTest
@coversDefaultClass \Drupal\Core\Entity\Sql\DefaultTableMapping @group Entity

Namespace

Drupal\Tests\Core\Entity\Sql

Code

public function testGetFieldTableNameInvalid() {
  $table_mapping = new DefaultTableMapping($this->entityType, []);
  $table_mapping
    ->getFieldTableName('invalid_field_name');
}