private function ContentHubEntityExportControllerTest::getContentHubEntitiesTrackingService in Acquia Content Hub 8
Loads a ContentHubEntitiesTracking object.
Return value
\Drupal\acquia_contenthub\ContentHubEntitiesTracking The loaded object.
3 calls to ContentHubEntityExportControllerTest::getContentHubEntitiesTrackingService()
- ContentHubEntityExportControllerTest::testExportEntities in tests/
src/ Unit/ Controller/ ContentHubEntityExportControllerTest.php - Tests exportEntities method.
- ContentHubEntityExportControllerTest::testQueueExportedEntity in tests/
src/ Unit/ Controller/ ContentHubEntityExportControllerTest.php - Tests queueExportedEntity method.
- ContentHubEntityExportControllerTest::testTrackExportedEntity in tests/
src/ Unit/ Controller/ ContentHubEntityExportControllerTest.php - Tests trackExportedEntity method.
File
- tests/
src/ Unit/ Controller/ ContentHubEntityExportControllerTest.php, line 605
Class
- ContentHubEntityExportControllerTest
- Unit test for ContentHubEntityExportController class.
Namespace
Drupal\Tests\acquia_contenthub\Unit\ControllerCode
private function getContentHubEntitiesTrackingService() {
/** @var \Drupal\Core\Database\Connection|\PHPUnit\Framework\MockObject\MockObject $database */
$database = $this
->getMockBuilder('\\Drupal\\Core\\Database\\Connection')
->disableOriginalConstructor()
->getMock();
$admin_config = $this
->getMockBuilder('\\Drupal\\Core\\Config\\ImmutableConfig')
->disableOriginalConstructor()
->getMock();
$admin_config
->method('get')
->with('origin')
->willReturn($this->siteOrigin);
/** @var \Drupal\Core\Config\ConfigFactoryInterface|\PHPUnit\Framework\MockObject\MockObject $config_factory */
$config_factory = $this
->getMockBuilder('\\Drupal\\Core\\Config\\ConfigFactoryInterface')
->disableOriginalConstructor()
->getMock();
$config_factory
->method('get')
->with('acquia_contenthub.admin_settings')
->willReturn($admin_config);
return new ContentHubEntitiesTracking($database, $config_factory);
}