You are here

public function ConfigEntityMapperTest::testGetOverviewRouteParameters in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest::testGetOverviewRouteParameters()

Tests ConfigEntityMapper::getOverviewRouteParameters().

File

core/modules/config_translation/tests/src/Unit/ConfigEntityMapperTest.php, line 143
Contains \Drupal\Tests\config_translation\Unit\ConfigEntityMapperTest.

Class

ConfigEntityMapperTest
Tests the functionality provided by the configuration entity mapper.

Namespace

Drupal\Tests\config_translation\Unit

Code

public function testGetOverviewRouteParameters() {
  $entity_type = $this
    ->getMock('Drupal\\Core\\Config\\Entity\\ConfigEntityTypeInterface');
  $this->entityManager
    ->expects($this
    ->once())
    ->method('getDefinition')
    ->with('configurable_language')
    ->will($this
    ->returnValue($entity_type));
  $this->configEntityMapper
    ->setEntity($this->entity);
  $this->entity
    ->expects($this
    ->once())
    ->method('id')
    ->with()
    ->will($this
    ->returnValue('entity_id'));
  $result = $this->configEntityMapper
    ->getOverviewRouteParameters();
  $this
    ->assertSame(array(
    'configurable_language' => 'entity_id',
  ), $result);
}