function ConfigMapperManagerTest::providerTestHasTranslatable
Same name in other branches
- 9 core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::providerTestHasTranslatable()
- 10 core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::providerTestHasTranslatable()
- 11.x core/modules/config_translation/tests/src/Unit/ConfigMapperManagerTest.php \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest::providerTestHasTranslatable()
Provides data for ConfigMapperManager::testHasTranslatable()
Return value
array An array of arrays, where each inner array contains the schema element to test as the first key and the expected result of ConfigMapperManager::hasTranslatable() as the second key.
File
-
core/
modules/ config_translation/ tests/ src/ Unit/ ConfigMapperManagerTest.php, line 85
Class
- ConfigMapperManagerTest
- Tests the functionality provided by configuration translation mapper manager.
Namespace
Drupal\Tests\config_translation\UnitCode
public function providerTestHasTranslatable() {
return [
[
$this->getElement([]),
FALSE,
],
[
$this->getElement([
'aaa' => 'bbb',
]),
FALSE,
],
[
$this->getElement([
'translatable' => FALSE,
]),
FALSE,
],
[
$this->getElement([
'translatable' => TRUE,
]),
TRUE,
],
[
$this->getNestedElement([
$this->getElement([]),
]),
FALSE,
],
[
$this->getNestedElement([
$this->getElement([
'translatable' => TRUE,
]),
]),
TRUE,
],
[
$this->getNestedElement([
$this->getElement([
'aaa' => 'bbb',
]),
$this->getElement([
'ccc' => 'ddd',
]),
$this->getElement([
'eee' => 'fff',
]),
]),
FALSE,
],
[
$this->getNestedElement([
$this->getElement([
'aaa' => 'bbb',
]),
$this->getElement([
'ccc' => 'ddd',
]),
$this->getElement([
'translatable' => TRUE,
]),
]),
TRUE,
],
[
$this->getNestedElement([
$this->getElement([
'aaa' => 'bbb',
]),
$this->getNestedElement([
$this->getElement([
'ccc' => 'ddd',
]),
$this->getElement([
'eee' => 'fff',
]),
]),
$this->getNestedElement([
$this->getElement([
'ggg' => 'hhh',
]),
$this->getElement([
'iii' => 'jjj',
]),
]),
]),
FALSE,
],
[
$this->getNestedElement([
$this->getElement([
'aaa' => 'bbb',
]),
$this->getNestedElement([
$this->getElement([
'ccc' => 'ddd',
]),
$this->getElement([
'eee' => 'fff',
]),
]),
$this->getNestedElement([
$this->getElement([
'ggg' => 'hhh',
]),
$this->getElement([
'translatable' => TRUE,
]),
]),
]),
TRUE,
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.