public function ImportEntityManagerTest::testAddEntityToQueue in Acquia Content Hub 8
Tests the ability to add an entity to the import queue.
@covers ::addEntityToImportQueue @dataProvider provideEntityUuid
File
- tests/
src/ Unit/ ImportEntityManagerTest.php, line 1036
Class
- ImportEntityManagerTest
- PHPUnit test for the ImportEntityManager class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
public function testAddEntityToQueue($uuid) {
$item = (object) [
'data' => [],
];
$item->data[] = new ImportQueueItem($uuid, TRUE, NULL, 0);
$this->importQueue
->method('createItem')
->with($item)
->willReturn(TRUE);
$return = $this->importEntityManager
->addEntityToImportQueue($uuid);
$this
->assertEquals(200, $return
->getStatusCode());
}