public function ConfigEntityMapperTest::testGetTypeName in Drupal 9
Same name and namespace in other branches
- 8 core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::testGetTypeName()
- 10 core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::testGetTypeName()
Tests ConfigEntityMapper::getTypeName().
File
- core/
modules/ config_translation/ tests/ src/ Unit/ ConfigEntityMapperTest.php, line 179
Class
- ConfigEntityMapperTest
- Tests the functionality provided by the configuration entity mapper.
Namespace
Drupal\Tests\config_translation\UnitCode
public function testGetTypeName() {
$entity_type = $this
->createMock('Drupal\\Core\\Config\\Entity\\ConfigEntityTypeInterface');
$entity_type
->expects($this
->once())
->method('getLabel')
->will($this
->returnValue('test'));
$this->entityTypeManager
->expects($this
->once())
->method('getDefinition')
->with('configurable_language')
->will($this
->returnValue($entity_type));
$result = $this->configEntityMapper
->getTypeName();
$this
->assertSame('test', $result);
}