abstract class ProcessTestCase

Base class for paragraphs process plugin tests.

Hierarchy

  • class \Drupal\Tests\paragraphs\Unit\migrate\ProcessTestCase extends \Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase

Expanded class hierarchy of ProcessTestCase

File

paragraphs/tests/src/Unit/migrate/ProcessTestCase.php, line 11

Namespace

Drupal\Tests\paragraphs\Unit\migrate
View source
abstract class ProcessTestCase extends MigrateProcessTestCase {

  /**
   * The entity bundle info service.
   *
   * @var \Drupal\Core\Entity\EntityTypeBundleInfoInterface|\PHPUnit_Framework_MockObject_InvocationMocker
   */
  protected $entityTypeBundleInfo;

  /**
   * {@inheritdoc}
   */
  protected function setUp() : void {
    parent::setUp();
    $this->entityTypeBundleInfo = $this
      ->getMockBuilder(EntityTypeBundleInfo::class)
      ->disableOriginalConstructor()
      ->getMock();
    $bundles = [
      'paragraph_bundle_one' => [],
      'paragraph_bundle_two' => [],
      'field_collection_bundle_one' => [],
      'field_collection_bundle_two' => [],
      'prexisting_bundle_one' => [],
      'prexisting_bundle_two' => [],
    ];
    $this->entityTypeBundleInfo
      ->expects($this
      ->any())
      ->method('getBundleInfo')
      ->with('paragraph')
      ->willReturn($bundles);
  }

}

Members

Name Modifierssort descending Type Description Overrides
ProcessTestCase::setUp protected function 3
ProcessTestCase::$entityTypeBundleInfo protected property The entity bundle info service.