/** * Create a REST Client. * * Creates a regular client first so we can profit from the bootstrapping code * in parent::createClient and is otherwise API compatible with said method. * * @param array $options An array of options to pass to the createKernel class * @param array $server An array of server parameters * * @return \Graviton\TestBundle\Client A Client instance */ protected static function createRestClient(array $options = array(), array $server = array()) { parent::createClient($options, $server); $client = static::$kernel->getContainer()->get('graviton.test.rest.client'); $client->setServerParameters($server); return $client; }
/** * Tests the execution of the command * * @return void */ public function testExecute() { $kernel = GravitonTestCase::createKernel(); $application = new Application($kernel); $application->add(new CleanDynamicBundleCacheCommand()); $command = $application->find('graviton:clean:dynamicbundles'); $command->setKernel($kernel); $command->setFilesystem($this->getFsMock()); $commandTester = new CommandTester($command); $commandTester->execute(array()); }