@@ 289-296 (lines=8) @@ | ||
286 | $transformer->transform(new POPO(), ['desc' => []]); |
|
287 | } |
|
288 | ||
289 | public function testFileAddedForAttachmentMapping() |
|
290 | { |
|
291 | $transformer = $this->getTransformer(); |
|
292 | $document = $transformer->transform(new POPO(), ['file' => ['type' => 'attachment']]); |
|
293 | $data = $document->getData(); |
|
294 | ||
295 | $this->assertSame(base64_encode(file_get_contents(__DIR__.'/../fixtures/attachment.odt')), $data['file']); |
|
296 | } |
|
297 | ||
298 | public function testFileContentsAddedForAttachmentMapping() |
|
299 | { |
|
@@ 298-307 (lines=10) @@ | ||
295 | $this->assertSame(base64_encode(file_get_contents(__DIR__.'/../fixtures/attachment.odt')), $data['file']); |
|
296 | } |
|
297 | ||
298 | public function testFileContentsAddedForAttachmentMapping() |
|
299 | { |
|
300 | $transformer = $this->getTransformer(); |
|
301 | $document = $transformer->transform(new POPO(), ['fileContents' => ['type' => 'attachment']]); |
|
302 | $data = $document->getData(); |
|
303 | ||
304 | $this->assertSame( |
|
305 | base64_encode(file_get_contents(__DIR__.'/../fixtures/attachment.odt')), $data['fileContents'] |
|
306 | ); |
|
307 | } |
|
308 | ||
309 | public function testNestedMapping() |
|
310 | { |