Knp\Bundle\KnpBundlesBundle\Tests\Commands\KbUpdateTrendsCommandTest::testExecute PHP Method

testExecute() public method

public testExecute ( )
    public function testExecute()
    {
        $client = $this->createClient();
        $application = new Application($client->getKernel());
        $application->add(new KbUpdateTrendsCommand());
        $command = $application->find('kb:update:trends');
        $commandTester = new CommandTester($command);
        $commandTester->execute(array('command' => $command->getName()));
        $this->assertRegExp('/3 rows updated/', $commandTester->getDisplay());
    }
KbUpdateTrendsCommandTest