if ($static &&
$withMedia) { $staticFileContent = 'this is some content';
$uploadFileRequest =
new Request([ 'extension' => FileTypes::PDF,
'fileName' => Uuid::
randomHex(),
],
[],
[],
[],
[],
[ 'HTTP_CONTENT_LENGTH' => \
strlen($staticFileContent),
'HTTP_CONTENT_TYPE' => 'application/pdf',
],
$staticFileContent);
$this->documentGenerator->
upload($result->
getId(),
$this->context,
$uploadFileRequest);
} } $expectedBlob = 'Dummy output';
$mockFpdi =
$this->
getMockBuilder(Fpdi::
class)->
onlyMethods(['Output', 'setSourceFile', 'importPage'
])->
getMock();
$mockFpdi->
expects(static::
any())->
method('setSourceFile'
)->
willReturn($numDocs);
$mockFpdi->
expects(static::
any())->
method('importPage'
)->
willReturn(''
);
// Only use merge when merging more than 1 documents