/**
  * Import extracted item
  *
  * @param ImportSource $importSource
  * @param ExtractedItem $item
  */
 public function importItem(ImportSource $importSource, ExtractedItem $item)
 {
     $data = $item->toArray();
     $data['pid'] = $importSource->getStoragePid();
     $data['import_id'] = $item->getGuid();
     $data['import_source'] = 'ext:news_importer';
     // clean body text
     if (!empty($data['bodytext'])) {
         $data['bodytext'] = $this->cleanBodyText($data['bodytext'], $data['pid']);
     }
     // parse media
     $data['media'] = $this->processMedia($data, $importSource);
     $this->newsImportService->import(array($data));
 }
 /**
  * @test
  */
 public function getStoragePidReturnsInitialValueForInteger()
 {
     $this->assertSame(0, $this->subject->getStoragePid());
 }