public function testCreateTransmissionClientSuccess() { $this->setCommandName('weburg-download'); parent::setUp(); $this->app->setClient(null); $config = new Config(); $config->set('transmission-host', 'devnull'); $config->set('transmission-port', 1234); $config->set('transmission-user', 'user'); $config->set('transmission-password', 'pass'); $config->set('dest', ''); $this->app->setConfig($config); $result = $this->executeCommand(); $this->assertEquals(1, $result); $this->assertRegExp('/Destination directory not defined/', $this->getDisplay()); }
public function setUp() { $this->setCommandName('stats-get'); parent::setUp(); $config = new Config(); $config->set('influxdb-host', 'devnull'); $config->set('influxdb-port', 1234); $config->set('influxdb-user', 'user'); $config->set('influxdb-password', 'pass'); $this->app->setConfig($config); $this->influxDb = $this->getMockBuilder('InfluxDB\\Client')->setMethods([])->setConstructorArgs([''])->disableOriginalConstructor()->getMock(); $this->influxDbClient = $this->getMock('Popstas\\Transmission\\Console\\InfluxDbClient', [], [$this->influxDb, 'test']); $this->database = $this->getMock('InfluxDB\\Database', [], ['dbname', $this->influxDb]); $this->database->method('exists')->will($this->returnValue(true)); $this->influxDb->method('selectDB')->will($this->returnValue($this->database)); $this->app->setInfluxDbClient($this->influxDbClient); }
public function setUp() { $this->setCommandName('torrent-list'); parent::setUp(); }
public function tearDown() { unlink($this->configFile); parent::tearDown(); }
public function setUp() { $this->setCommandName('torrent-remove-duplicates'); parent::setUp(); }
public function tearDown() { // TODO: dirty downloaded variable define $this->rmdir($this->dest . '/downloaded'); parent::tearDown(); }
public function setUp() { $this->setCommandName('_docs'); parent::setUp(); }