Example #1
0
 public function testGetFileContentInArchive()
 {
     /** @var ZipArchiveBuilder $archive */
     $archive = $this->getArchiveBuilderManager($this->container)->get("ZIP");
     $formatter = new XMLFormatter();
     $archive->addFileFromString("foo", $formatter::FILENAME . "." . $formatter->getExtension());
     $content = $this->controller->getFileContentInArchive($archive, $this->getFormatterManager($this->container), [$formatter->getHandledType()]);
     $this->assertEquals(["content" => "foo", "formatter" => $formatter], $content);
 }
Example #2
0
 public function testMetaData()
 {
     $this->assertEquals("XML", $this->formatter->getName());
     $this->assertEquals("xml", $this->formatter->getExtension());
     $this->assertEquals("application/xml", $this->formatter->getMimeType());
 }