public function ConfigMapperManagerTest::providerTestHasTranslatable in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 90 - Contains \Drupal\Tests\config_translation\Unit\ConfigMapperManagerTest.
Class
- ConfigMapperManagerTest
- Tests the functionality provided by configuration translation mapper manager.
Namespace
Drupal\Tests\config_translation\UnitCode
public function providerTestHasTranslatable() {
return array(
array(
$this
->getElement(array()),
FALSE,
),
array(
$this
->getElement(array(
'aaa' => 'bbb',
)),
FALSE,
),
array(
$this
->getElement(array(
'translatable' => FALSE,
)),
FALSE,
),
array(
$this
->getElement(array(
'translatable' => TRUE,
)),
TRUE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array()),
)),
FALSE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array(
'translatable' => TRUE,
)),
)),
TRUE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array(
'aaa' => 'bbb',
)),
$this
->getElement(array(
'ccc' => 'ddd',
)),
$this
->getElement(array(
'eee' => 'fff',
)),
)),
FALSE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array(
'aaa' => 'bbb',
)),
$this
->getElement(array(
'ccc' => 'ddd',
)),
$this
->getElement(array(
'translatable' => TRUE,
)),
)),
TRUE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array(
'aaa' => 'bbb',
)),
$this
->getNestedElement(array(
$this
->getElement(array(
'ccc' => 'ddd',
)),
$this
->getElement(array(
'eee' => 'fff',
)),
)),
$this
->getNestedElement(array(
$this
->getElement(array(
'ggg' => 'hhh',
)),
$this
->getElement(array(
'iii' => 'jjj',
)),
)),
)),
FALSE,
),
array(
$this
->getNestedElement(array(
$this
->getElement(array(
'aaa' => 'bbb',
)),
$this
->getNestedElement(array(
$this
->getElement(array(
'ccc' => 'ddd',
)),
$this
->getElement(array(
'eee' => 'fff',
)),
)),
$this
->getNestedElement(array(
$this
->getElement(array(
'ggg' => 'hhh',
)),
$this
->getElement(array(
'translatable' => TRUE,
)),
)),
)),
TRUE,
),
);
}