You are here

private function ContentHubEntityExportControllerTest::getEntities in Acquia Content Hub 8

Helper method to stub response.

Return value

array CDF response.

2 calls to ContentHubEntityExportControllerTest::getEntities()
ContentHubEntityExportControllerTest::createContentHubEntity in tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php
Creates a Content Hub Entity for testing purposes.
ContentHubEntityExportControllerTest::testExportEntities in tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php
Tests exportEntities method.

File

tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php, line 496

Class

ContentHubEntityExportControllerTest
Unit test for ContentHubEntityExportController class.

Namespace

Drupal\Tests\acquia_contenthub\Unit\Controller

Code

private function getEntities() {
  return [
    'entities' => [
      [
        'uuid' => '00000000-1111-0000-0000-000000000000',
        'type' => 'node',
        'origin' => '00000000-0000-0000-0000-000000000000',
        'created' => '2017-11-10T13:35:23+00:00',
        'modified' => '2017-11-10T15:08:47+00:00',
        'attributes' => [
          'langcode' => [
            'type' => 'string',
            'value' => [
              'en' => 'en',
            ],
          ],
          'type' => [
            'type' => 'string',
            'value' => [
              'en' => 'article',
            ],
          ],
          'title' => [
            'type' => 'string',
            'value' => [
              'en' => 'test',
            ],
          ],
          'revision_log' => [
            'type' => 'array<string>',
            'value' => [
              'en' => NULL,
            ],
          ],
          'body' => [
            'type' => 'array<string>',
            'value' => [
              'en' => [
                0 => '{"value":"\\u003Cp\\u003E test\\u003C\\/p\\u003E\\r\\n","format":"basic_html","summary":""}',
              ],
            ],
          ],
          'url' => [
            'type' => 'string',
            'value' => [
              'en' => 'http://localhost/node/1',
            ],
          ],
        ],
      ],
    ],
  ];
}