Skip to content

Commit

Permalink
fixed cache setup and teardown of Zend\Measure tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-mabe committed Jun 2, 2012
1 parent 3a84022 commit 4b0d4b9
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions tests/Zend/Measure/CommonTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

namespace ZendTest\Measure;
use Zend\Cache\StorageFactory as CacheFactory,
Zend\Cache\Storage\Adapter\AdapterInterface as CacheAdapter,
Zend\Locale\Locale;

/**
Expand All @@ -39,22 +38,9 @@
abstract class CommonTestCase extends \PHPUnit_Framework_TestCase
{

/**
* The used cache adapter
* @var CacheAdapter
*/
protected $cache;

public function setUp()
{
$this->cache = CacheFactory::adapterFactory('memory', array('memory_limit' => 0));
Locale::setCache($this->cache);
}

public function tearDown()
{
if ($this->cache) {
$this->cache->clear(CacheAdapter::MATCH_ALL);
}
$cache = CacheFactory::adapterFactory('memory', array('memory_limit' => 0));
Locale::setCache($cache);
}
}

0 comments on commit 4b0d4b9

Please sign in to comment.