Exemplo n.º 1
0
 public function testConstruct()
 {
     $dataset = uniqid();
     $format = uniqid();
     $download = new Download($dataset, $format);
     $this->assertEquals($dataset, $download->getDataset());
     $this->assertEquals($format, $download->getFormat());
     $this->assertCount(2, $download->getParameters());
 }
 /**
  * @param Download $download
  *
  * @return null|string
  */
 public function getLocalDatasetContent(Download $download)
 {
     $content = null;
     $filepath = $this->finder->findDataset($download->getDataset(), $download->getFormat(), $download->getFilter());
     if (false !== $filepath) {
         $content = $this->finder->getContent($filepath);
     }
     return $content;
 }