protected function EntityManagerTest::setUp in Acquia Content Hub 8
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ EntityManagerTest.php, line 92
Class
- EntityManagerTest
- PHPUnit for the EntityManager class.
Namespace
Drupal\Tests\acquia_contenthub\UnitCode
protected function setUp() {
parent::setUp();
$this->loggerFactory = $this
->getMockBuilder('Drupal\\Core\\Logger\\LoggerChannelFactoryInterface')
->disableOriginalConstructor()
->getMock();
$this->configFactory = $this
->getMockBuilder('Drupal\\Core\\Config\\ConfigFactoryInterface')
->disableOriginalConstructor()
->getMock();
$this->clientManager = $this
->createMock('Drupal\\acquia_contenthub\\Client\\ClientManagerInterface');
$this->contentHubEntitiesTracking = $this
->getMockBuilder('Drupal\\acquia_contenthub\\ContentHubEntitiesTracking')
->disableOriginalConstructor()
->getMock();
$this->entityTypeManager = $this
->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->entityTypeBundleInfoManager = $this
->createMock('Drupal\\Core\\Entity\\EntityTypeBundleInfoInterface');
$this->kernel = $this
->createMock('Symfony\\Component\\HttpKernel\\HttpKernelInterface');
$this->settings = $this
->getMockBuilder('Drupal\\Core\\Config\\Config')
->disableOriginalConstructor()
->getMock();
$this->configFactory
->expects($this
->at(0))
->method('get')
->with('acquia_contenthub.admin_settings')
->willReturn($this->settings);
$this->contentEntityType = $this
->createMock('Drupal\\Core\\Entity\\ContentEntityTypeInterface');
$this->configEntityType = $this
->createMock('Drupal\\Core\\Config\\Entity\\ConfigEntityTypeInterface');
}