CachePoolListCommand example

public function testEmptyList()
    {
        $tester = $this->createCommandTester([]);
        $tester->execute([]);

        $tester->assertCommandIsSuccessful('cache:pool:list exits with 0 in case of success');
    }

    private function createCommandTester(array $poolNames)
    {
        $application = new Application(static::$kernel);
        $application->add(new CachePoolListCommand($poolNames));

        return new CommandTester($application->find('cache:pool:list'));
    }
}
Home | Imprint | This part of the site doesn't use cookies.