From 744db40f944879674434a1e467cd2e4b778e83c6 Mon Sep 17 00:00:00 2001 From: Mikael Randy Date: Fri, 3 Jan 2014 14:39:16 +0100 Subject: [PATCH] Add: annotation to disable kernel reset --- Test/Units/WebTestCase.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Test/Units/WebTestCase.php b/Test/Units/WebTestCase.php index 16e8b77..f3e4634 100644 --- a/Test/Units/WebTestCase.php +++ b/Test/Units/WebTestCase.php @@ -76,6 +76,18 @@ function($strict = false) use (& $crawler, $generator) { } + protected function setClassAnnotations(atoum\annotations\extractor $extractor) + { + parent::setClassAnnotations($extractor); + + $test = $this; + + $extractor + ->setHandler('resetKernel', function($value) use ($test) { $test->enableKernelReset(atoum\annotations\extractor::toBoolean($value)); }) + ->setHandler('noResetKernel', function() use ($test) { $test->enableKernelReset(false); }) + ; + } + /** * @param \Symfony\Bundle\FrameworkBundle\Client $client * @param \Symfony\Component\DomCrawler\Crawler $crawler