You are here

protected function AcquiadamMockedMediaEntityTrait::getMockedFileEntity in Media: Acquia DAM 8

Return a consistent, barebones file entity.

Return value

\Drupal\file\FileInterface|\PHPUnit\Framework\MockObject\MockObject A mocked file entity.

File

tests/src/Traits/AcquiadamMockedMediaEntityTrait.php, line 100

Class

AcquiadamMockedMediaEntityTrait
Shared complex mocked media and related entities.

Namespace

Drupal\Tests\media_acquiadam\Traits

Code

protected function getMockedFileEntity() {
  $file_entity = $this
    ->getMockBuilder(FileInterface::class)
    ->disableOriginalConstructor()
    ->getMock();
  $file_entity
    ->method('id')
    ->willReturn(894782578);
  return $file_entity;
}