From 005e56c72aaaaf1732470f06a9609a9d7504e1a2 Mon Sep 17 00:00:00 2001 From: Marc Ducobu Date: Fri, 7 Nov 2014 23:52:46 +0100 Subject: [PATCH] Test : Check if class Chill\ReportBundle\Entity\Report is in chill_custom_fields.customizables_entities --- .../ChillReportExtensionTest.php | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Tests/DependencyInjection/ChillReportExtensionTest.php diff --git a/Tests/DependencyInjection/ChillReportExtensionTest.php b/Tests/DependencyInjection/ChillReportExtensionTest.php new file mode 100644 index 000000000..beb246ea0 --- /dev/null +++ b/Tests/DependencyInjection/ChillReportExtensionTest.php @@ -0,0 +1,29 @@ + 'test')); + $customizablesEntities = static::$kernel->getContainer() + ->getParameter('chill_custom_fields.customizables_entities'); + + $reportFounded = false; + foreach ($customizablesEntities as $customizablesEntity) { + if($customizablesEntity['class'] === 'Chill\ReportBundle\Entity\Report') { + $reportFounded = true; + } + } + + if(! $reportFounded) { + throw new Exception("Class Chill\ReportBundle\Entity\Report not found in chill_custom_fields.customizables_entities", 1); + } + } +}