diff --git a/Extractor/CachingApiDocExtractor.php b/Extractor/CachingApiDocExtractor.php
index 997fa48..b3ff882 100644
--- a/Extractor/CachingApiDocExtractor.php
+++ b/Extractor/CachingApiDocExtractor.php
@@ -73,14 +73,12 @@ class CachingApiDocExtractor extends ApiDocExtractor
     {
         $cache = $this->getViewCache($view);
 
-        if ($cache->isFresh() === false) {
-
+        if (!$cache->isFresh()) {
             $resources = array();
-
             foreach ($this->getRoutes() as $route) {
                 if ( null !== ($method = $this->getReflectionMethod($route->getDefault('_controller')))
                   && null !== ($annotation = $this->reader->getMethodAnnotation($method, self::ANNOTATION_CLASS))) {
-                    $file = $method->getDeclaringClass()->getFileName();
+                    $file        = $method->getDeclaringClass()->getFileName();
                     $resources[] = new FileResource($file);
                 }
             }
@@ -94,8 +92,14 @@ class CachingApiDocExtractor extends ApiDocExtractor
             return $data;
         }
 
-        return unserialize(file_get_contents($cache));
+        // For BC
+        if (method_exists($cache, 'getPath')) {
+            $cachePath = $cache->getPath();
+        } else {
+            $cachePath = (string) $cache;
+        }
 
+        return unserialize(file_get_contents($cachePath));
     }
 
     /**
diff --git a/Tests/Extractor/CachingApiDocExtractorTest.php b/Tests/Extractor/CachingApiDocExtractorTest.php
index 36892b8..8303121 100644
--- a/Tests/Extractor/CachingApiDocExtractorTest.php
+++ b/Tests/Extractor/CachingApiDocExtractorTest.php
@@ -67,8 +67,6 @@ class CachingApiDocExtractorTest extends WebTestCase
 
         $expectedViewCacheFile = $cacheFile.'.'.$view;
 
-        $this->assertFileNotExists($expectedViewCacheFile);
-
         set_error_handler(array($this, 'handleDeprecation'));
         $data = $extractor->all($view);
 
diff --git a/Tests/WebTestCase.php b/Tests/WebTestCase.php
index f986df9..53f3826 100644
--- a/Tests/WebTestCase.php
+++ b/Tests/WebTestCase.php
@@ -17,10 +17,10 @@ use Symfony\Component\HttpKernel\Kernel;
 
 abstract class WebTestCase extends BaseWebTestCase
 {
+    public static $container;
+
     protected function setUp()
     {
-        $this->deleteTmpDir();
-
         parent::setUp();
 
         if (version_compare(Kernel::VERSION, '2.2.0', '<')) {
@@ -28,16 +28,6 @@ abstract class WebTestCase extends BaseWebTestCase
         }
     }
 
-    protected function deleteTmpDir()
-    {
-        if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION)) {
-            return;
-        }
-
-        $fs = new Filesystem();
-        $fs->remove($dir);
-    }
-
     public static function handleDeprecation($errorNumber, $message, $file, $line, $context)
     {
         if ($errorNumber & E_USER_DEPRECATED) {
@@ -49,12 +39,17 @@ abstract class WebTestCase extends BaseWebTestCase
 
     protected function getContainer(array $options = array())
     {
-        if (!static::$kernel) {
-            static::$kernel = static::createKernel($options);
-        }
-        static::$kernel->boot();
+        if (!static::$container) {
+            if (!static::$kernel) {
+                static::$kernel = static::createKernel($options);
+            }
 
-        return static::$kernel->getContainer();
+            static::$kernel->boot();
+
+            static::$container = static::$kernel->getContainer();
+        }
+
+        return static::$container;
     }
 
     protected static function getKernelClass()
@@ -73,10 +68,4 @@ abstract class WebTestCase extends BaseWebTestCase
             isset($options['debug']) ? $options['debug'] : true
         );
     }
-
-    public function tearDown()
-    {
-        parent::tearDown();
-        $this->deleteTmpDir();
-    }
 }