ProcessTestCase.php in Paragraphs 8
File
tests/src/Unit/migrate/ProcessTestCase.php
View source
<?php
namespace Drupal\Tests\paragraphs\Unit\migrate;
use Drupal\Core\Entity\EntityTypeBundleInfo;
use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase;
abstract class ProcessTestCase extends MigrateProcessTestCase {
protected $entityTypeBundleInfo;
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);
}
}