You are here

public function NodeTypePreviewImageFormTest::setUp in Acquia Content Hub 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/Form/NodeTypePreviewImageFormTest.php, line 58

Class

NodeTypePreviewImageFormTest
PHPUnit test for the NodeTypePreviewImageForm class.

Namespace

Drupal\Tests\acquia_contenthub\Unit\Form

Code

public function setUp() : void {
  parent::setUp();
  $this->contenthubEntityManager = $this
    ->getMockBuilder('Drupal\\acquia_contenthub\\EntityManager')
    ->disableOriginalConstructor()
    ->getMock();
  $this->entityTypeManager = $this
    ->createMock('Drupal\\Core\\Entity\\EntityTypeManagerInterface');
  $this->entityFieldManager = $this
    ->createMock('Drupal\\Core\\Entity\\EntityFieldManagerInterface');
  $this->contenthubEntityConfig = $this
    ->createMock('Drupal\\acquia_contenthub\\ContentHubEntityTypeConfigInterface');
  $this->contenthubEntityManager
    ->expects($this
    ->once())
    ->method('getContentHubEntityTypeConfigurationEntity')
    ->willReturn($this->contenthubEntityConfig);
}