public function testSignature() { $this->inputDefinition->shouldReceive("addArgument")->times(3); $commandName = "thread:command"; $command = new ThreadCommand($commandName, $this->runnerFactory); $command->setDefinition($this->inputDefinition); $command->configure(); $this->assertEquals($commandName, $command->getName()); }
public function testConfigure() { $pidFile = "pid.pid"; $poolCommand = "pool:command"; $command = new PoolControlCommand($this->runnerFactory, $this->pidFactory, $pidFile, $poolCommand); $command->setDefinition($this->inputDefinition); $this->inputDefinition->shouldReceive("addArgument")->once(); $command->configure(); }
public function testConstruct() { $poolCommand = "pool:command"; $pidFile = "pool.pid"; $this->inputDefinition->shouldReceive("addOption")->once(); $command = new PoolCommand($poolCommand, "thread:command", $pidFile, $this->pidFactory, $this->runnerFactory, []); $command->setDefinition($this->inputDefinition); $command->configure(); $this->assertEquals($poolCommand, $command->getName()); }