From b4f613067ed38f7eac9b518a7a380f1a51fed1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Monta=C3=B1ez?= Date: Sat, 31 Mar 2018 04:42:01 -0300 Subject: [PATCH] [Discovery One] Improve tests --- .../Symfony/CachePoolClearTaskTest.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/Task/BuiltIn/Symfony/CachePoolClearTaskTest.php diff --git a/tests/Task/BuiltIn/Symfony/CachePoolClearTaskTest.php b/tests/Task/BuiltIn/Symfony/CachePoolClearTaskTest.php new file mode 100644 index 0000000..0aa8098 --- /dev/null +++ b/tests/Task/BuiltIn/Symfony/CachePoolClearTaskTest.php @@ -0,0 +1,38 @@ +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()); + } + } +} \ No newline at end of file