Beispiel #1
0
 public function testClearMaterializedViewFiles()
 {
     $static = $this->getDirectoryCleanMock();
     $var = $this->getDirectoryCleanMock(DirectoryList::TMP_MATERIALIZATION_DIR);
     $this->filesystem->expects($this->exactly(2))->method('getDirectoryWrite')->will($this->returnValueMap([[DirectoryList::STATIC_VIEW, DriverPool::FILE, $static], [DirectoryList::VAR_DIR, DriverPool::FILE, $var]]));
     $this->object->clearMaterializedViewFiles();
 }
 /**
  * Cleanup after updated modules status
  *
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return void
  */
 private function cleanup(InputInterface $input, OutputInterface $output)
 {
     $this->cache->clean();
     $output->writeln('<info>Cache cleared successfully.</info>');
     if ($input->getOption(self::INPUT_KEY_CLEAR_STATIC_CONTENT)) {
         $this->cleanupFiles->clearMaterializedViewFiles();
         $output->writeln('<info>Generated static view files cleared successfully.</info>');
     } else {
         $output->writeln('<error>Alert: Generated static view files were not cleared.' . ' You can clear them using the --' . self::INPUT_KEY_CLEAR_STATIC_CONTENT . ' option.' . ' Failure to clear static view files might cause display issues in the Admin and storefront.</error>');
     }
 }