You are here

protected function PathautoTest::getEntitiesDataArray in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/tests/src/Functional/PathautoTest.php \Drupal\Tests\entity_share_client\Functional\PathautoTest::getEntitiesDataArray()

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 EntityShareClientFunctionalTestBase::getEntitiesDataArray

File

modules/entity_share_client/tests/src/Functional/PathautoTest.php, line 71

Class

PathautoTest
General functional test class for path field.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function getEntitiesDataArray() {
  return [
    'node' => [
      'en' => [
        'es_test_path_auto' => $this
          ->getCompleteNodeInfos([
          'title' => [
            'value' => 'Automatic',
            'checker_callback' => 'getValue',
          ],
          'status' => [
            'value' => NodeInterface::PUBLISHED,
            'checker_callback' => 'getValue',
          ],
        ]),
        'es_test_path_manual' => $this
          ->getCompleteNodeInfos([
          'title' => [
            'value' => 'Manual',
            'checker_callback' => 'getValue',
          ],
          'path' => [
            'value' => [
              [
                'alias' => '/manual_path',
                'pathauto' => 0,
              ],
            ],
            'checker_callback' => 'getValue',
          ],
          'status' => [
            'value' => NodeInterface::PUBLISHED,
            'checker_callback' => 'getValue',
          ],
        ]),
      ],
    ],
  ];
}