You are here

public function ContentHubImportQueueBaseTest::provideQueueItems in Acquia Content Hub 8

Provide QueueItems for the queue process.

File

tests/src/Unit/Plugin/QueueWorker/ContentHubImportQueueBaseTest.php, line 22

Class

ContentHubImportQueueBaseTest
Test for Content Hub Import Queue Base.

Namespace

Drupal\Tests\acquia_contenthub\Unit\Plugin\QueueWorker

Code

public function provideQueueItems() {
  $data = [];
  $data[] = [
    [
      new ImportQueueItem('00000000-0000-0000-0000-000000000000'),
    ],
    [
      [
        '00000000-0000-0000-0000-000000000000',
        TRUE,
        TRUE,
        0,
      ],
    ],
  ];
  $data[] = [
    [
      new ImportQueueItem('00000000-0000-0000-0000-000000000000'),
      new ImportQueueItem('00000000-0001-0000-0000-000000000000', FALSE),
      new ImportQueueItem('00000000-0002-0000-0000-000000000000', TRUE, TRUE, 1),
    ],
    [
      [
        '00000000-0000-0000-0000-000000000000',
        TRUE,
        TRUE,
        0,
      ],
      [
        '00000000-0001-0000-0000-000000000000',
        FALSE,
        TRUE,
        0,
      ],
      [
        '00000000-0002-0000-0000-000000000000',
        TRUE,
        TRUE,
        1,
      ],
    ],
  ];
  $data[] = [
    (object) [
      'data' => [
        new ImportQueueItem('00000000-0000-0000-0000-000000000000'),
      ],
    ],
    [
      [
        '00000000-0000-0000-0000-000000000000',
        TRUE,
        TRUE,
        0,
      ],
    ],
  ];
  return $data;
}