protected function ContentHubEntityExportControllerTest::setUp in Acquia Content Hub 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ Controller/ ContentHubEntityExportControllerTest.php, line 111
Class
- ContentHubEntityExportControllerTest
- Unit test for ContentHubEntityExportController class.
Namespace
Drupal\Tests\acquia_contenthub\Unit\ControllerCode
protected function setUp() : void {
parent::setUp();
$this->clientManager = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\Client\\ClientManagerInterface')
->disableOriginalConstructor()
->getMock();
$this->entityManager = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\EntityManager')
->disableOriginalConstructor()
->getMock();
$this->contentHubEntitiesTracking = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\ContentHubEntitiesTracking')
->disableOriginalConstructor()
->getMock();
$this->contentEntityCdfNormalizer = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\Normalizer\\ContentEntityCdfNormalizer')
->disableOriginalConstructor()
->getMock();
$this->contentHubExportQueueController = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\Controller\\ContentHubExportQueueController')
->disableOriginalConstructor()
->getMock();
$this->entityRepository = $this
->getMockBuilder('\\Drupal\\Core\\Entity\\EntityRepositoryInterface')
->disableOriginalConstructor()
->getMock();
$this->contentHubInternalRequest = $this
->getMockBuilder('\\Drupal\\acquia_contenthub\\ContentHubInternalRequest')
->disableOriginalConstructor()
->getMock();
$this->config = $this
->getMockBuilder('\\Drupal\\Core\\Config\\Config')
->disableOriginalConstructor()
->getMock();
$this->configFactory = $this
->getMockBuilder('\\Drupal\\Core\\Config\\ConfigFactoryInterface')
->disableOriginalConstructor()
->getMock();
$this->configFactory
->method('get')
->with('acquia_contenthub.entity_config')
->willReturn($this->config);
$logger_channel = $this
->getMockBuilder(LoggerChannelInterface::class)
->disableOriginalConstructor()
->getMock();
$this->loggerFactory = $this
->getMockBuilder(LoggerChannelFactoryInterface::class)
->disableOriginalConstructor()
->getMock();
$this->loggerFactory
->method('get')
->with('acquia_contenthub')
->willReturn($logger_channel);
$this
->instantiateContentHubEntityController();
}