Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
 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());
 }