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'); }
public function testWaitForTransmission() { $this->client->waitForTransmission(0); }