shouldReceive('get')->with('js-localization::config.locales') ->andReturn(null); $this->setExpectedException('Exception'); $this->runCommand(); } protected function runCommand () { $cmd = new RefreshCommand(); $cmd->run( new Symfony\Component\Console\Input\ArrayInput(array('package' => 'foo')), new Symfony\Component\Console\Output\NullOutput ); } }