You are here

public function ConfigMapperManagerTest::testHasTranslatable in Zircon Profile 8

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

Tests ConfigMapperManager::hasTranslatable().

@dataProvider providerTestHasTranslatable

Parameters

\Drupal\Core\TypedData\TypedDataInterface $element: The schema element to test.

bool $expected: The expected return value of ConfigMapperManager::hasTranslatable().

File

core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php, line 71
Contains \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest.

Class

ConfigMapperManagerTest
Tests the functionality provided by configuration translation mapper manager.

Namespace

Drupal\Tests\config_translation\Unit

Code

public function testHasTranslatable(TypedDataInterface $element, $expected) {
  $this->typedConfigManager
    ->expects($this
    ->once())
    ->method('get')
    ->with('test')
    ->will($this
    ->returnValue($element));
  $result = $this->configMapperManager
    ->hasTranslatable('test');
  $this
    ->assertSame($expected, $result);
}