public function ContentHubReindexTest::testGetReExportEntities in Acquia Content Hub 8
Test the getReExportEntities function.
@covers ::getReExportEntities
File
- tests/
src/ Unit/ Controller/ ContentHubReindexTest.php, line 308
Class
- ContentHubReindexTest
- @coversDefaultClass \Drupal\acquia_contenthub\Controller\ContentHubReindex
Namespace
Drupal\Tests\acquia_contenthub\Unit\ControllerCode
public function testGetReExportEntities() {
$entities = $this
->getEntitiesData();
$offset = 1;
$limit = 3;
$this->contentHubEntitiesTracking
->expects($this
->once())
->method('getEntitiesToReindex')
->willReturn($entities);
$result = $this->contentHubReindex
->getReExportEntities($offset, $limit);
$this
->assertEquals(array_slice($entities, $offset, $limit), $result);
}