You are here

protected function ContentHubEntityExportControllerTest::getBasicEntities in Acquia Content Hub 8

Returns array of basic Drupal entities: taxonomy term, node and user.

Return value

array A set of basic Drupal entities.

3 calls to ContentHubEntityExportControllerTest::getBasicEntities()
ContentHubEntityExportControllerTest::getSampleCandidateEntities in tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php
Returns array of sample candidate entities.
ContentHubEntityExportControllerTest::getSampleCandidateReferencedEntities in tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php
Returns array of sample candidate referenced entities.
ContentHubEntityExportControllerTest::testExportEntities in tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php
Tests exportEntities method.

File

tests/src/Unit/Controller/ContentHubEntityExportControllerTest.php, line 415

Class

ContentHubEntityExportControllerTest
Unit test for ContentHubEntityExportController class.

Namespace

Drupal\Tests\acquia_contenthub\Unit\Controller

Code

protected function getBasicEntities() {
  $taxonomy_term = $this
    ->getMockBuilder('Drupal\\taxonomy\\Entity\\Term')
    ->disableOriginalConstructor()
    ->getMock();
  $taxonomy_term
    ->method('getEntityTypeId')
    ->willReturn('taxonomy_term');
  $node = $this
    ->getMockBuilder('Drupal\\node\\Entity\\Node')
    ->disableOriginalConstructor()
    ->getMock();
  $node
    ->method('getEntityTypeId')
    ->willReturn('node');
  $user = $this
    ->getMockBuilder('Drupal\\user\\Entity\\User')
    ->disableOriginalConstructor()
    ->getMock();
  $user
    ->method('getEntityTypeId')
    ->willReturn('user');
  return [
    $taxonomy_term,
    $node,
    $user,
  ];
}