diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index bb28c1090724..4612898794ea 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -25,6 +25,9 @@
./app
+
+
+
diff --git a/tests/TestListener.php b/tests/TestListener.php
new file mode 100644
index 000000000000..fd18c7d72442
--- /dev/null
+++ b/tests/TestListener.php
@@ -0,0 +1,43 @@
+
+ */
+class TestListener extends PHPUnit_Framework_BaseTestListener
+{
+ /**
+ * A test suite ended.
+ *
+ * @since Method available since Release 2.2.0
+ *
+ * @param \PHPUnit_Framework_TestSuite $suite
+ *
+ * @return void
+ */
+ public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
+ {
+ if ($suite->getName() !== 'Cachet Test Suite') {
+ return;
+ }
+
+ foreach (glob(__DIR__.'/../bootstrap/cache/*.php') as $file) {
+ unlink($file);
+ }
+ }
+}