protected function AuthenticationAnonymousTest::getEntitiesDataArray in Entity Share 8.3
Helper function to get a mapping of the entities data.
Used to create the entities for the test and to test that it has been recreated properly.
Overrides AuthenticationTestBase::getEntitiesDataArray
File
- modules/
entity_share_client/ tests/ src/ Functional/ AuthenticationAnonymousTest.php, line 56
Class
- AuthenticationAnonymousTest
- Functional test class for import with "Anonymous" authorization.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function getEntitiesDataArray() {
return [
'file' => [
'en' => $this
->preparePhysicalFilesAndFileEntitiesData(),
],
'node' => [
'en' => [
'es_test_node_import_published' => $this
->getCompleteNodeInfos([
'status' => [
'value' => NodeInterface::PUBLISHED,
'checker_callback' => 'getValue',
],
]),
'es_test_node_import_not_published' => $this
->getCompleteNodeInfos([
'status' => [
'value' => NodeInterface::NOT_PUBLISHED,
'checker_callback' => 'getValue',
],
]),
'es_test_node_import_with_file' => $this
->getCompleteNodeInfos([
'status' => [
'value' => NodeInterface::PUBLISHED,
'checker_callback' => 'getValue',
],
'field_es_test_file' => [
'value_callback' => function () {
return [
[
'target_id' => $this
->getEntityId('file', 'private_file'),
],
];
},
'checker_callback' => 'getFilteredStructureValues',
],
]),
],
],
];
}