Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     /** @var StorageInterface $storage */
     $storage = $this->getContainer()->get('storage');
     $backupFilesystem = $storage->open($input->getArgument('file'));
     $database = new ReadonlyDatabase(json_decode($backupFilesystem->read('database/system.json'), true));
     $output->writeln(sprintf(' * label:    %s', $database->get('label')));
     $output->writeln(sprintf(' * message:  %s', $database->get('message')));
     $output->writeln(sprintf(' * started:  %s', $database->get('started')));
     $output->writeln(sprintf(' * finished: %s', $database->get('finished')));
     $output->writeln(sprintf(' * size:     %s', (new ByteFormatter())->format($storage->size($backupFilesystem))));
 }
Exemplo n.º 2
0
 public function testGetNotExisting()
 {
     $this->setExpectedException(PropertyNotExistsException::class);
     $this->database->get('version');
 }