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

Commit

Permalink
Merge branch 'master' of https://github.com/zendframework/zf2 into ho…
Browse files Browse the repository at this point in the history
…tfix/session-container-array-object
  • Loading branch information
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Service/StorageCacheFactory.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Storage/Adapter/MemcachedResourceManager.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down Expand Up @@ -213,7 +213,7 @@ public function setLibOptions($id, array $libOptions)
$resource = & $this->resources[$id];
if ($resource instanceof MemcachedResource) {
if (method_exists($resource, 'setOptions')) {
$resource->setOptions($resource);
$resource->setOptions($libOptions);
} else {
foreach ($libOptions as $key => $value) {
$resource->setOption($key, $value);
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/Session.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/SessionOptions.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/XCache.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down
2 changes: 1 addition & 1 deletion src/Storage/Adapter/XCacheOptions.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

Expand Down
2 changes: 1 addition & 1 deletion test/Service/StorageCacheFactoryTest.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Cache
*/
Expand Down
2 changes: 1 addition & 1 deletion test/Storage/Adapter/CommonAdapterTest.php
Expand Up @@ -1024,7 +1024,7 @@ public function testClearExpired()
$this->assertTrue($this->_storage->hasItem('key2'));
}

public function testTagable()
public function testTaggable()
{
if (!($this->_storage instanceof TaggableInterface)) {
$this->markTestSkipped("Storage doesn't implement TaggableInterface");
Expand Down
2 changes: 1 addition & 1 deletion test/Storage/Adapter/KeyListIteratorTest.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Cache
*/
Expand Down
23 changes: 22 additions & 1 deletion test/Storage/Adapter/MemcachedResourceManagerTest.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Cache
*/
Expand Down Expand Up @@ -233,4 +233,25 @@ public function testValidResources($resourceId, $resource, $expectedPersistentId
$this->assertSame($this->resourceManager, $this->resourceManager->removeResource($resourceId));
$this->assertFalse($this->resourceManager->hasResource($resourceId));
}

public function testSetLibOptionsOnExistingResource()
{
$memcachedInstalled = class_exists('Memcached', false);

$libOptions = array('compression' => false);
$resourceId = 'testResourceId';
$resourceMock = $this->getMock('Memcached', array('setOptions'));

if (!$memcachedInstalled) {
$this->setExpectedException('Zend\Cache\Exception\InvalidArgumentException');
} else {
$resourceMock
->expects($this->once())
->method('setOptions')
->with($this->isType('array'));
}

$this->resourceManager->setResource($resourceId, $resourceMock);
$this->resourceManager->setLibOptions($resourceId, $libOptions);
}
}
2 changes: 1 addition & 1 deletion test/Storage/Adapter/SessionTest.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Cache
*/
Expand Down
2 changes: 1 addition & 1 deletion test/Storage/Adapter/XCacheTest.php
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Cache
*/
Expand Down

0 comments on commit 4fbd64e

Please sign in to comment.