From e478e243d8273fc24821765dbb0ee7df5dc73c3d Mon Sep 17 00:00:00 2001 From: Ricard Clau Date: Fri, 8 Mar 2013 10:48:49 +0100 Subject: [PATCH] add explicit profiler enabling, necessary on 2.2 --- cookbook/email/testing.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbook/email/testing.rst b/cookbook/email/testing.rst index 9b18d6c6a1e..7386618303d 100644 --- a/cookbook/email/testing.rst +++ b/cookbook/email/testing.rst @@ -41,6 +41,10 @@ to get information about the messages send on the previous request:: public function testMailIsSentAndContentIsOk() { $client = static::createClient(); + + // Enable the profiler for the next request (it does nothing if the profiler is not available) + $client->enableProfiler(); + $crawler = $client->request('POST', '/path/to/above/action'); $mailCollector = $client->getProfile()->getCollector('swiftmailer');