Пример #1
0
 protected function setUp()
 {
     $output = new ConsoleOutput();
     $logger = new Logger('WriteMetasFromXML');
     $logger->pushHandler(new OutputHandler($output));
     $options = array('no_backup' => false, 'allow_duplicate' => false);
     self::$filesystem->remove(__DIR__ . '/../../ressources/blender.sqlite');
     self::$filesystem->remove(glob(__DIR__ . "/../../ressources/output/*.jpg"));
     self::$filesystem->remove(__DIR__ . '/../../ressources/tmp');
     $database = new Database(array('path' => __DIR__ . '/../../ressources/blender.sqlite', 'driver' => 'pdo_sqlite'), new Configuration());
     $config = new Config(__DIR__ . '/../../ressources/jir.config.yml');
     $process = new Process\WriteMetasFromXML($config, $database, $logger, new ParameterBag($options));
     $tmpPath = __DIR__ . '/../../ressources/tmp';
     $process->setTempFolder($tmpPath . '/copy');
     $process->setLogFolder($tmpPath . '/log');
     $process->setBackupFolder($tmpPath . '/backup');
     $this->process = $process;
 }