diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index e44535a81a..59ec772525 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -65,6 +65,7 @@
Cache\IntegrationTests
Doctrine\Common\Cache
Symfony\Component\Cache
+ Symfony\Component\Cache\Tests\Fixtures
Symfony\Component\Cache\Traits
Symfony\Component\Console
Symfony\Component\HttpFoundation
diff --git a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php
index 93ec982438..8d4dfe2858 100644
--- a/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php
+++ b/src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php
@@ -11,8 +11,8 @@
namespace Symfony\Component\Cache\Tests\Adapter;
-use Doctrine\Common\Cache\ArrayCache;
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
+use Symfony\Component\Cache\Tests\Fixtures\ArrayCache;
/**
* @group time-sensitive
diff --git a/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php b/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php
new file mode 100644
index 0000000000..1a6157e822
--- /dev/null
+++ b/src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php
@@ -0,0 +1,52 @@
+doContains($id) ? $this->data[$id][0] : false;
+ }
+
+ protected function doContains($id)
+ {
+ if (!isset($this->data[$id])) {
+ return false;
+ }
+
+ $expiry = $this->data[$id][1];
+
+ return !$expiry || time() <= $expiry || !$this->doDelete($id);
+ }
+
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ $this->data[$id] = array($data, $lifeTime ? time() + $lifeTime : false);
+
+ return true;
+ }
+
+ protected function doDelete($id)
+ {
+ unset($this->data[$id]);
+
+ return true;
+ }
+
+ protected function doFlush()
+ {
+ $this->data = array();
+
+ return true;
+ }
+
+ protected function doGetStats()
+ {
+ return null;
+ }
+}
diff --git a/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php b/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php
index 0a185297ab..127c96858c 100644
--- a/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php
+++ b/src/Symfony/Component/Cache/Tests/Simple/DoctrineCacheTest.php
@@ -11,8 +11,8 @@
namespace Symfony\Component\Cache\Tests\Simple;
-use Doctrine\Common\Cache\ArrayCache;
use Symfony\Component\Cache\Simple\DoctrineCache;
+use Symfony\Component\Cache\Tests\Fixtures\ArrayCache;
/**
* @group time-sensitive
diff --git a/src/Symfony/Component/Cache/phpunit.xml.dist b/src/Symfony/Component/Cache/phpunit.xml.dist
index 6b5c79331d..9b3c30d76f 100644
--- a/src/Symfony/Component/Cache/phpunit.xml.dist
+++ b/src/Symfony/Component/Cache/phpunit.xml.dist
@@ -39,6 +39,7 @@
Cache\IntegrationTests
Doctrine\Common\Cache
Symfony\Component\Cache
+ Symfony\Component\Cache\Tests\Fixtures
Symfony\Component\Cache\Traits