add(new SmsSendCommand()); $command = $application->find('nexmo:sms:send'); $commandTester = new CommandTester($command); try { $commandTester->execute(array()); $this->assertTrue(false); } catch(\RuntimeException $e) { $this->assertEquals('Not enough arguments.',$e->getMessage()); } $arguments = array( 'command' => 'nexmo:sms:send', 'number' => 'demo:greet', 'fromName' => 'Fabien', 'message' => '', ); $input = new ArrayInput($arguments); $returnCode = $command->run($input, $output); $commandTester->execute(array("+34666555444","MyApp","Hello World!!")); // $this->assertRegExp('/.../', $commandTester->getDisplay()); } }