runtime = new RuntimeMockup(); $this->runtime->setConfiguration(['environments' => ['test' => []]]); $this->runtime->setEnvironment('test'); } public function testAsseticDumpTask() { $task = new CachePoolClearTask(); $task->setOptions(['env' => 'test']); $task->setRuntime($this->runtime); $this->assertEquals('[Symfony] Cache Pool Clear', $task->getDescription()); try { $task->execute(); } catch (ErrorException $exception) { $this->assertEquals('Parameter "pools" is not defined', $exception->getMessage()); } } }