Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/db-story-41
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Db/Sql/Predicate/Literal.php
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
6 changes: 6 additions & 0 deletions src/SaveHandler/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ class Cache implements Savable
*/
protected $sessionName;

/**
* The cache storage adapter
* @var StorageAdapter
*/
protected $storageAdapter;

/**
* Constructor
*
Expand Down
17 changes: 8 additions & 9 deletions test/SaveHandler/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
use Zend\Session\SaveHandler\Cache,
Zend\Session\SaveHandler\Exception as SaveHandlerException,
Zend\Session\Manager,
Zend\Cache\Storage\Adapter\Memory;
Zend\Cache\StorageFactory as CacheFactory,
Zend\Cache\Storage\Adapter as CacheAdapter;

/**
* Unit testing for DbTable include all tests for
Expand All @@ -41,9 +42,9 @@
class CacheTest extends \PHPUnit_Framework_TestCase
{
/**
* @var Zend\Cache\Storage\Adapter\Memory
* @var Zend\Cache\Storage\Adapter
*/
protected $memory;
protected $cache;

/**
* @var string
Expand All @@ -60,14 +61,13 @@ class CacheTest extends \PHPUnit_Framework_TestCase

public function setUp()
{
$this->memory = new Memory();
$this->cache = CacheFactory::adapterFactory('memory', array('memory_limit' => 0));
$this->testArray = array('foo' => 'bar', 'bar' => array('foo' => 'bar'));
}

public function testReadWrite()
{
$this->_usedSaveHandlers[] =
$saveHandler = new Cache($this->memory);
$this->_usedSaveHandlers[] = $saveHandler = new Cache($this->cache);

$id = '242';

Expand All @@ -79,7 +79,7 @@ public function testReadWrite()

public function testReadWriteComplex()
{
$saveHandler = new Cache($this->memory);
$saveHandler = new Cache($this->cache);
$saveHandler->open('savepath', 'sessionname');

$id = '242';
Expand All @@ -91,8 +91,7 @@ public function testReadWriteComplex()

public function testReadWriteTwice()
{
$this->_usedSaveHandlers[] =
$saveHandler = new Cache($this->memory);
$this->_usedSaveHandlers[] = $saveHandler = new Cache($this->cache);

$id = '242';

Expand Down

0 comments on commit 846449d

Please sign in to comment.