public function testAddMetadata()
 {
     $torrentFile = tempnam(sys_get_temp_dir(), 'torrent');
     $this->client->addTorrent($torrentFile);
     unlink($torrentFile);
     //$this->markTestIncomplete();
 }
예제 #2
0
 private function addFile(InputInterface $input, OutputInterface $output, TransmissionClient $client, $torrentFile)
 {
     $this->dryRun($input, $output, function () use($torrentFile, $client, $input, $output) {
         $torrentAdded = $client->addTorrent($torrentFile);
         if ($torrentAdded) {
             if (isset($torrentAdded['duplicate'])) {
                 $output->writeln($torrentFile . ' was not added. Probably it was added before.');
             } else {
                 $output->writeln($torrentFile . ' added. Waiting for Transmission...');
                 $client->waitForTransmission(10);
             }
         }
     }, 'dry-run, don\'t really add torrents');
 }