public function testFireWithValidHostCallsInfo()
 {
     list($arguments, $options) = $this->createArgumentsAndOptions();
     $mockConnection = m::mock('Illuminate\\Remote\\Connection');
     $mockConnection->shouldReceive('run')->withAnyArgs()->once();
     $this->mockAws->shouldReceive('getPublicDNSFromInstanceId')->with(array_get($arguments, CommandRules::INSTANCE_ID))->andReturn('127.0.0.1')->once();
     $this->mockConnectionFactory->shouldReceive('createConnection')->withArgs(array(array_get($arguments, CommandRules::INSTANCE_ID), '127.0.0.1', array_get($options, CommandRules::USER), array_get($options, CommandRules::KEY_FILE)))->andReturn($mockConnection)->once();
     $this->controller->fire($arguments, $options);
 }
Esempio n. 2
0
 public function fire()
 {
     $controller = new EC2TailCommandController($this->app, $this->aws, $this, new ConnectionFactory());
     $controller->fire($this->argument(), $this->option());
 }