Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make it possible to run the tests with or without caching

  • Loading branch information...
commit f38bce3032973ecb71f852ede66162bff17d4742 1 parent 16f2f87
@lsmith77 lsmith77 authored
View
2  phpunit.xml.dist
@@ -13,10 +13,10 @@
<var name="phpcr.user" value="admin" />
<var name="phpcr.pass" value="admin" />
<var name="phpcr.workspace" value="tests" />
+ <var name="data_caches" value="meta,nodes" />
<!-- Doctrine DBAL database configuration -->
<var name="phpcr.doctrine.dbal.driver" value="pdo_sqlite" />
<var name="phpcr.doctrine.dbal.path" value="phpcr_tests.db" />
- <!-- for mysql and postgresql use this -->
<var name="phpcr.doctrine.dbal.host" value="localhost"/>
<var name="phpcr.doctrine.dbal.username" value="jackalope"/>
<var name="phpcr.doctrine.dbal.password" value=""/>
View
16 src/Jackalope/Transport/DoctrineDBAL/Test/ImplementationLoader.php
@@ -3,6 +3,7 @@
#namespace Jackalope\Transport\DoctrineDBAL\Test;
use Doctrine\DBAL\Connection;
+use Doctrine\Common\Cache\ArrayCache;
/**
* Implementation loader for jackalope-doctrine-dbal
@@ -115,8 +116,19 @@ public function getConnection()
public function getRepositoryFactoryParameters()
{
- // initialized in bootstrap_doctrine_dbal.php
- return array('jackalope.doctrine_dbal_connection' => $this->connection);
+ if (empty($GLOBALS['data_caches'])) {
+ $caches = null;
+ } else {
+ $caches = array();
+ foreach (explode(',', $GLOBALS['data_caches']) as $key) {
+ $caches[$key] = new ArrayCache();
+ }
+ }
+
+ return array(
+ 'jackalope.doctrine_dbal_connection' => $this->connection,
+ 'jackalope.data_caches' => $caches,
+ );
}
public function getCredentials()
Please sign in to comment.
Something went wrong with that request. Please try again.