You are here

private function FpmTestBase::getProcessorMock in Feeds Paragraphs 8

Mocks an entity processor instance.

Return value

EntityProcessorBase|\PHPUnit\Framework\MockObject\MockObject

1 call to FpmTestBase::getProcessorMock()
FpmTestBase::getFeedTypeMock in tests/src/Unit/FpmTestBase.php
Creates feed type entity.

File

tests/src/Unit/FpmTestBase.php, line 225

Class

FpmTestBase

Namespace

Drupal\Tests\feeds_para_mapper\Unit

Code

private function getProcessorMock() {
  $processor = $this
    ->getMockBuilder(EntityProcessorBase::class)
    ->disableOriginalConstructor()
    ->setMethods(array(
    'entityType',
    'bundle',
  ))
    ->getMock();
  $processor
    ->expects($this
    ->any())
    ->method('entityType')
    ->will($this
    ->returnValue("node"));
  $processor
    ->expects($this
    ->any())
    ->method('bundle')
    ->will($this
    ->returnValue("product"));
  return $processor;
}