Added: trunk/Cache/tests/storage_apc_array_test.php
==============================================================================
--- trunk/Cache/tests/storage_apc_array_test.php (added)
+++ trunk/Cache/tests/storage_apc_array_test.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -1,0 +1,257 @@
+<?php
+/**
+ * ezcCacheStorageFileApcArrayTest
+ *
+ * @package Cache
+ * @subpackage Tests
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * Require parent test class.
+ */
+require_once 'storage_test.php';
+require_once 'wrappers/apc_array_wrapper.php';
+
+/**
+ * Test suite for ezcCacheStorageFileApcArray class.
+ *
+ * @package Cache
+ * @subpackage Tests
+ */
+class ezcCacheStorageFileApcArrayTest extends ezcCacheStorageTest
+{
+ /**
+ * Test data.
+ *
+ * @var array(string=>mixed)
+ */
+ protected $data = array(
+ 0 => array( 'a' ),
+ 1 => array( 1, 2, 3 ),
+ 2 => array( 'a', 1, 'b', 2, 'c', 3 ),
+ 3 => array(
+ 1, 2, 3,
+ array( 'a', 'b', 'c' ),
+ 4, 5
+ ),
+ 4 => array(
+ array(
+ array( 1 ), array( 2, 3 )
+ ),
+ 1, 2, 3,
+ array( 'a', 'b', 'c' ),
+ ),
+ 5 => "Test 1 2 3 4 5 6 7 8\\\\",
+ 6 => 'La la la 02064 lololo',
+ 7 => true,
+ // 8 => false, // 6 tests fail with this
+ 9 => 12345,
+ 10 => 12.3746,
+ );
+
+ protected function setUp()
+ {
+ if ( !ezcBaseFeatures::hasExtensionSupport( 'apc' ) )
+ {
+ $this->markTestSkipped( "PHP must be compiled with
--enable-apxs2." );
+ }
+
+ // Class name == <inheriting class> - "Test"
+ $storageClass = ( $this->storageClass = substr( get_class( $this ), 0,
strlen( get_class( $this ) ) - 4 ) );
+ $this->storage = new $storageClass( $this->createTempDir(
'ezcCacheTest' ), array( 'ttl' => 10 ) );
+ }
+
+ // Override test from parent class
+ public function testConstructorErrorLocationNotWriteable()
+ {
+ return true;
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithoutAttributes()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $storage->store( $id, $dataArr );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id );
+ $registry = $storage->getRegistry();
+ foreach ( $registry as $location => $dataObj )
+ {
+ if ( isset( $dataObj->data )
+ && $dataArr === $dataObj->data
+ && strpos( $location, $this->getTempDir() ) !== false )
+ {
+ break;
+ }
+ }
+
+ $registry[$location]->mtime = time() - 100;
+ $storage->setRegistry( $registry );
+
+ $data = $storage->restore( $id );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithAttributes()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $attributes = array(
+ 'name' => 'test',
+ 'title' => 'Test item',
+ 'date' => time() . $id,
+ );
+
+ $storage->store( $id, $dataArr, $attributes );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id, $attributes );
+ $registry = $storage->getRegistry();
+ foreach ( $registry as $location => $dataObj )
+ {
+ if ( isset( $dataObj->data )
+ && $dataArr === $dataObj->data
+ && strpos( $location, $this->getTempDir() ) !== false )
+ {
+ break;
+ }
+ }
+
+ $registry[$location]->mtime = time() - 100;
+ $storage->setRegistry( $registry );
+
+ // Wait for cache to be outdated.
+ $data = $storage->restore( $id, $attributes );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ public function testMockApcBackend()
+ {
+ $apcBackend = $this->getMock( 'ezcCacheApcBackend', array( 'store' ),
array() );
+ $apcBackend->expects( $this->any() )
+ ->method( 'store' )
+ ->will( $this->returnValue( false ) );
+
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+ $storage->setBackend( $apcBackend );
+
+ $id = 'id';
+ try
+ {
+ $storage->store( $id, 'data' );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheApcException $e )
+ {
+ $this->assertEquals( "APC store failed.", $e->getMessage() );
+ }
+ }
+
+ public function testStoreResource()
+ {
+ $resource = fopen( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
'wrappers' . DIRECTORY_SEPARATOR . 'apc_wrapper.php', 'r' );
+ try
+ {
+ $this->storage->store( "key", $resource );
+ fclose( $resource );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheInvalidDataException $e )
+ {
+ fclose( $resource );
+ $this->assertEquals( "The given data was of type 'resource', which
can not be stored. Expecting: 'simple, array'.", $e->getMessage() );
+ }
+ }
+
+ public function testWrapperFetchDataUseApc()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+
+ $data = 'data';
+ $key = 'key';
+
+ $storage->store( $key, $data );
+ $storage->restore( $key );
+ $registry = $storage->getRegistry();
+
+ list( $identifier, $dataArr ) = each( $registry );
+
+ $dataFetched = $storage->fetchData( $identifier, true );
+ $this->assertEquals( $data, $dataFetched );
+ }
+
+ public function testWrapperPrepareDataUseApcResourceFail()
+ {
+ $resource = fopen( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
'wrappers' . DIRECTORY_SEPARATOR . 'apc_wrapper.php', 'r' );
+
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+
+ try
+ {
+ $storage->prepareData( $resource, true );
+ fclose( $resource );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheInvalidDataException $e )
+ {
+ fclose( $resource );
+ $this->assertEquals( "The given data was of type 'resource', which
can not be stored. Expecting: 'simple, array, object'.", $e->getMessage() );
+ }
+ }
+
+ public function testWrapperCalcLifetimeNoApc()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageFileApcArrayWrapper(
$this->getTempDir(), $options );
+
+ $data = 'data';
+ $key = 'key';
+
+ $filename = $this->getTempDir() . DIRECTORY_SEPARATOR .
$storage->generateIdentifier( $key, array() );
+
+ file_put_contents( $filename, $data );
+ touch( $filename, time() - 10 );
+
+ $lifetime = $storage->calcLifetime( $filename, false );
+
+ // "8 <= " - for those cases where the current second changes during
requests
+ $this->assertEquals( true, 8 <= $lifetime );
+ }
+
+ public function testStorageFileApcArrayOptions()
+ {
+ $options = new ezcCacheStorageFileApcArrayOptions();
+
+ $this->invalidPropertyTest( $options, 'ttl', 'wrong value', 'int > 0
or false' );
+ $this->invalidPropertyTest( $options, 'permissions', 'wrong value',
'int > 0 and <= 0777' );
+ $this->invalidPropertyTest( $options, 'permissions', -1, 'int > 0 and
<= 0777' );
+ $this->invalidPropertyTest( $options, 'permissions', 07777, 'int > 0
and <= 0777' );
+ $this->missingPropertyTest( $options, 'no_such_option' );
+
+ // valid set
+ $options->permissions = 0777;
+ }
+
+ public static function suite()
+ {
+ return new PHPUnit_Framework_TestSuite( __CLASS__ );
+ }
+}
+?>
Propchange: trunk/Cache/tests/storage_apc_array_test.php
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/Cache/tests/storage_apc_plain_test.php
==============================================================================
--- trunk/Cache/tests/storage_apc_plain_test.php (added)
+++ trunk/Cache/tests/storage_apc_plain_test.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -1,0 +1,197 @@
+<?php
+/**
+ * ezcCacheStorageApcPlainTest
+ *
+ * @package Cache
+ * @subpackage Tests
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * Require parent test class.
+ */
+require_once 'storage_test.php';
+require_once 'wrappers/apc_wrapper.php';
+
+/**
+ * Test suite for ezcCacheStorageApc class.
+ *
+ * @package Cache
+ * @subpackage Tests
+ */
+class ezcCacheStorageApcPlainTest extends ezcCacheStorageTest
+{
+ /**
+ * Test data.
+ *
+ * @var array(string)
+ */
+ protected $data = array(
+ 1 => "Test 1 2 3 4 5 6 7 8\\\\",
+ 2 => 'La la la 02064 lololo',
+ 3 => 12345,
+ 4 => 12.3746,
+ );
+
+ protected function setUp()
+ {
+ if ( !ezcBaseFeatures::hasExtensionSupport( 'apc' ) )
+ {
+ $this->markTestSkipped( "PHP must be compiled with
--enable-apxs2." );
+ }
+
+ // Class name == <inheriting class> - "Test"
+ $storageClass = ( $this->storageClass = substr( get_class( $this ), 0,
strlen( get_class( $this ) ) - 4 ) );
+ $this->storage = new $storageClass( $this->createTempDir(
'ezcCacheTest' ), array( 'ttl' => 10 ) );
+ }
+
+ // Override test from parent class
+ public function testConstructorErrorLocationNotWriteable()
+ {
+ return true;
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithoutAttributes()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageApcWrapper( $this->getTempDir(),
$options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $storage->store( $id, $dataArr );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id );
+ $registry = $storage->getRegistry();
+
+ $location = $this->getTempDir() . DIRECTORY_SEPARATOR;
+ list( $identifier, $dataObj ) = each( $registry[$location][$id] );
+ $registry[$location][$id][$identifier]->time = time() - 100;
+ $storage->setRegistry( $registry );
+
+ $data = $storage->restore( $id );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithAttributes()
+ {
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageApcWrapper( $this->getTempDir(),
$options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $attributes = array(
+ 'name' => 'test',
+ 'title' => 'Test item',
+ 'date' => time() . $id,
+ );
+
+ $storage->store( $id, $dataArr, $attributes );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id, $attributes );
+ $registry = $storage->getRegistry();
+
+ $location = $this->getTempDir() . DIRECTORY_SEPARATOR;
+ list( $identifier, $dataObj ) = each( $registry[$location][$id] );
+ $registry[$location][$id][$identifier]->time = time() - 100;
+ $storage->setRegistry( $registry );
+
+ // Wait for cache to be outdated.
+ $data = $storage->restore( $id, $attributes );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ public function testMockApcBackend()
+ {
+ $apcBackend = $this->getMock( 'ezcCacheApcBackend', array( 'store' ),
array() );
+ $apcBackend->expects( $this->any() )
+ ->method( 'store' )
+ ->will( $this->returnValue( false ) );
+
+ $options = array( 'ttl' => 10 );
+ $storage = new ezcCacheStorageApcWrapper( '.', $options );
+ $storage->setBackend( $apcBackend );
+
+ $id = 'id';
+ try
+ {
+ $storage->store( $id, 'data' );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheApcException $e )
+ {
+ $this->assertEquals( "Apc store failed.", $e->getMessage() );
+ }
+ }
+
+ public function testStoreResource()
+ {
+ $resource = fopen( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
'wrappers' . DIRECTORY_SEPARATOR . 'apc_wrapper.php', 'r' );
+ try
+ {
+ $this->storage->store( "key", $resource );
+ fclose( $resource );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheInvalidDataException $e )
+ {
+ fclose( $resource );
+ $this->assertEquals( "The given data was of type 'resource', which
can not be stored. Expecting: 'simple, array, object'.", $e->getMessage() );
+ }
+ }
+
+ public function testGetRemainingLifetimeId()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1' );
+
+ // "8 <= " - for those cases where the current second changes after
the storage
+ $this->assertEquals( true, 8 <= $this->storage->getRemainingLifetime(
'1' ) );
+
+ }
+
+ public function testGetRemainingLifetimeAttributes()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1', array( 'type' => 'simple' ) );
+ $this->storage->store( '2', 'data2', array( 'type' => 'simple' ) );
+
+ // "8 <= " - for those cases where the current second changes after
the storage
+ $this->assertEquals( true, 8 <= $this->storage->getRemainingLifetime(
null, array( 'type' => 'simple' ) ) );
+
+ }
+
+ public function testGetRemainingLifetimeNoMatch()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->assertEquals( 0, $this->storage->getRemainingLifetime(
'no_such_id' ) );
+
+ }
+
+ public function testStorageApcOptions()
+ {
+ $options = new ezcCacheStorageApcOptions();
+
+ $this->invalidPropertyTest( $options, 'ttl', 'wrong value', 'int > 0
or false' );
+ $this->missingPropertyTest( $options, 'no_such_option' );
+
+ $this->issetPropertyTest( $options, 'ttl', true );
+ $this->issetPropertyTest( $options, 'no_such_option', false );
+ }
+
+ public static function suite()
+ {
+ return new PHPUnit_Framework_TestSuite( __CLASS__ );
+ }
+}
+?>
Propchange: trunk/Cache/tests/storage_apc_plain_test.php
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/Cache/tests/storage_file_options_test.php
==============================================================================
--- trunk/Cache/tests/storage_file_options_test.php [iso-8859-1] (original)
+++ trunk/Cache/tests/storage_file_options_test.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -119,6 +119,53 @@
$this->assertFalse( isset( $opt->foo ) );
}
+ public function testMergeOptions()
+ {
+ $options = new ezcCacheStorageFileOptions();
+ $optionsNew = new ezcCacheStorageOptions();
+ $optionsNew->ttl = 30;
+ $options->mergeStorageOptions( $optionsNew );
+ $this->assertEquals( 30, $options->ttl );
+ }
+
+ public function testOptions()
+ {
+ $obj = new ezcCacheStorageFileArray( '/tmp' );
+ $options = new ezcCacheStorageFileOptions();
+ $optionsGeneral = new ezcCacheStorageOptions();
+
+ $obj->options = $optionsGeneral;
+ $this->assertEquals( $optionsGeneral, $obj->getOptions() );
+
+ $obj->options = $options;
+ $this->assertEquals( $options, $obj->getOptions() );
+
+ $obj->setOptions( $optionsGeneral );
+ $this->assertEquals( $options, $obj->getOptions() );
+
+ $obj->setOptions( $options );
+ $this->assertEquals( $options, $obj->getOptions() );
+
+ try
+ {
+ $obj->setOptions( 'wrong value' );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseValueException $e )
+ {
+ $this->assertEquals( "The value 'wrong value' that you were trying
to assign to setting 'options' is invalid. Allowed values are: instance of
ezcCacheStorageFileOptions or (deprecated) ezcCacheStorageOptions.",
$e->getMessage() );
+ }
+ }
+
+ public function testProperties()
+ {
+ $obj = new ezcCacheStorageFileArray( '/tmp' );
+ $options = new ezcCacheStorageFileOptions();
+
+ $this->invalidPropertyTest( $obj, 'options', 'wrong value', 'instance
of ezcCacheStorageFileOptions' );
+ $this->missingPropertyTest( $obj, 'no_such_option' );
+ }
+
protected function genericSetFailureTest( $obj, $property, $value )
{
try
Added: trunk/Cache/tests/storage_memcache_plain_test.php
==============================================================================
--- trunk/Cache/tests/storage_memcache_plain_test.php (added)
+++ trunk/Cache/tests/storage_memcache_plain_test.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -1,0 +1,238 @@
+<?php
+/**
+ * ezcCacheStorageMemcachePlainTest
+ *
+ * @package Cache
+ * @subpackage Tests
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * Require parent test class.
+ */
+require_once 'storage_test.php';
+require_once 'wrappers/memcache_wrapper.php';
+
+/**
+ * Test suite for ezcCacheStorageMemcachePlain class.
+ *
+ * @package Cache
+ * @subpackage Tests
+ */
+class ezcCacheStorageMemcachePlainTest extends ezcCacheStorageTest
+{
+ /**
+ * Test data.
+ *
+ * @var array(string)
+ */
+ protected $data = array(
+ 1 => "Test 1 2 3 4 5 6 7 8\\\\",
+ 2 => 'La la la 02064 lololo',
+ 3 => 12345,
+ 4 => 12.3746,
+ );
+
+ protected function setUp()
+ {
+ if ( !ezcBaseFeatures::hasExtensionSupport( 'memcache' ) )
+ {
+ $this->markTestSkipped( "PHP must be compiled with
--enable-memcache." );
+ }
+
+ if ( !ezcBaseFeatures::hasExtensionSupport( 'zlib' ) )
+ {
+ $this->markTestSkipped( "PHP must be compiled with --with-zlib." );
+ }
+
+ // Class name == <inheriting class> - "Test"
+ $storageClass = ( $this->storageClass = substr( get_class( $this ), 0,
strlen( get_class( $this ) ) - 4 ) );
+ $this->storage = new $storageClass( $this->createTempDir(
'ezcCacheTest' ), array( 'host' => 'localhost', 'port' => 11211, 'ttl' => 10 )
);
+ }
+
+ // Override test from parent class
+ public function testConstructorErrorLocationNotWriteable()
+ {
+ return true;
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithoutAttributes()
+ {
+ $options = array( 'host' => 'localhost', 'port' => 11211, 'ttl' => 10
);
+ $storage = new ezcCacheStorageMemcacheWrapper( $this->getTempDir(),
$options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $storage->store( $id, $dataArr );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id );
+ $registry = $storage->getRegistry();
+
+ $location = $this->getTempDir() . DIRECTORY_SEPARATOR;
+ list( $identifier, $dataObj ) = each( $registry[$location][$id] );
+ $registry[$location][$id][$identifier]->time = time() - 100;
+ $storage->setRegistry( $registry );
+
+ $data = $storage->restore( $id );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ // Override test from parent class
+ public function testStoreRestoreOutdatedWithAttributes()
+ {
+ $options = array( 'host' => 'localhost', 'port' => 11211, 'ttl' => 10
);
+ $storage = new ezcCacheStorageMemcacheWrapper( $this->getTempDir(),
$options );
+
+ foreach ( $this->data as $id => $dataArr )
+ {
+ $attributes = array(
+ 'name' => 'test',
+ 'title' => 'Test item',
+ 'date' => time() . $id,
+ );
+
+ $storage->store( $id, $dataArr, $attributes );
+
+ // Hack the cache to be outdated by 100 seconds
+ $data = $storage->restore( $id, $attributes );
+ $registry = $storage->getRegistry();
+
+ $location = $this->getTempDir() . DIRECTORY_SEPARATOR;
+ list( $identifier, $dataObj ) = each( $registry[$location][$id] );
+ $registry[$location][$id][$identifier]->time = time() - 100;
+ $storage->setRegistry( $registry );
+
+ // Wait for cache to be outdated.
+ $data = $storage->restore( $id, $attributes );
+ $this->assertTrue( $data === false, "Restore data broken for ID
<{$id}>." );
+ }
+ }
+
+ // Override test from parent class
+ public function testCountDataItemsIdNoAttributesSubdirs()
+ {
+ $id = 'id/with/slashes/';
+ $attributes = array( 'class' => 23 );
+ foreach ( $this->data as $idSuffix => $data )
+ {
+ $this->storage->store( $id . $idSuffix, $data, $attributes );
+ }
+
+ foreach ( $this->data as $idSuffix => $data ) {
+ $this->assertEquals(
+ 1,
+ $this->storage->countDataItems( $id . $idSuffix ),
+ "Data count for ID with slashes incorrect."
+ );
+ }
+ }
+
+ public function testStoreResource()
+ {
+ $resource = fopen( dirname( __FILE__ ) . DIRECTORY_SEPARATOR .
'wrappers' . DIRECTORY_SEPARATOR . 'memcache_wrapper.php', 'r' );
+ try
+ {
+ $this->storage->store( "key", $resource );
+ fclose( $resource );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheInvalidDataException $e )
+ {
+ fclose( $resource );
+ $this->assertEquals( "The given data was of type 'resource', which
can not be stored. Expecting: 'simple, array, object'.", $e->getMessage() );
+ }
+ }
+
+ public function testMemcacheUnknownHost()
+ {
+ try
+ {
+ $memcache = new ezcCacheStorageMemcachePlain( '.', array( 'host'
=> 'unknown_host', 'port' => 11211, 'ttl' => 10 ) );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheMemcacheException $e )
+ {
+ $this->assertEquals( "Could not connect to Memcache.",
$e->getMessage() );
+ }
+
+ }
+
+ public function testBackendPersistentUnknownHost()
+ {
+ try
+ {
+ $memcache = new ezcCacheMemcacheBackend( array( 'host' =>
'unknown_host', 'port' => 11211, 'ttl' => 10, 'persistent' => true ) );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcCacheMemcacheException $e )
+ {
+ $this->assertEquals( "Could not connect to Memcache using a
persistent connection.", $e->getMessage() );
+ }
+ }
+
+ public function testBackendPersistentConnectionThenDestruct()
+ {
+ $storage = new ezcCacheMemcacheBackend( array( 'host' => 'localhost',
'port' => 11211, 'ttl' => 10, 'persistent' => true ) );;
+ $storage->__destruct();
+ }
+
+ public function testGetRemainingLifetimeId()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1' );
+
+ // "8 <= " - for those cases where the current second changes after
the storage
+ $this->assertEquals( true, 8 <= $this->storage->getRemainingLifetime(
'1' ) );
+
+ }
+
+ public function testGetRemainingLifetimeAttributes()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1', array( 'type' => 'simple' ) );
+ $this->storage->store( '2', 'data2', array( 'type' => 'simple' ) );
+
+ // "8 <= " - for those cases where the current second changes after
the storage
+ $this->assertEquals( true, 8 <= $this->storage->getRemainingLifetime(
null, array( 'type' => 'simple' ) ) );
+
+ }
+
+ public function testGetRemainingLifetimeNoMatch()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->assertEquals( 0, $this->storage->getRemainingLifetime(
'no_such_id' ) );
+
+ }
+
+ public function testStorageMemcacheOptions()
+ {
+ $options = new ezcCacheStorageMemcacheOptions();
+
+ $this->invalidPropertyTest( $options, 'ttl', 'wrong value', 'int > 0
or false' );
+ $this->invalidPropertyTest( $options, 'port', 'wrong value', 'int' );
+ $this->invalidPropertyTest( $options, 'compressed', 'wrong value',
'bool' );
+ $this->invalidPropertyTest( $options, 'persistent', 'wrong value',
'bool' );
+ $this->missingPropertyTest( $options, 'no_such_option' );
+
+ $this->issetPropertyTest( $options, 'host', true );
+ $this->issetPropertyTest( $options, 'ttl', true );
+ $this->issetPropertyTest( $options, 'port', true );
+ $this->issetPropertyTest( $options, 'compressed', true );
+ $this->issetPropertyTest( $options, 'persistent', true );
+ $this->issetPropertyTest( $options, 'no_such_option', false );
+ }
+
+ public static function suite()
+ {
+ return new PHPUnit_Framework_TestSuite( __CLASS__ );
+ }
+}
+?>
Propchange: trunk/Cache/tests/storage_memcache_plain_test.php
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/Cache/tests/storage_options_test.php
==============================================================================
--- trunk/Cache/tests/storage_options_test.php [iso-8859-1] (original)
+++ trunk/Cache/tests/storage_options_test.php [iso-8859-1] Fri Oct 5 12:44:13
2007
@@ -9,13 +9,16 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
+require_once 'Cache/tests/test.php';
+require_once 'wrappers/memcache_wrapper.php';
+
/**
* Abstract base test class for ezcCacheStorageOptions tests.
*
* @package Cache
* @subpackage Tests
*/
-class ezcCacheStorageOptionsTest extends ezcTestCase
+class ezcCacheStorageOptionsTest extends ezcCacheTest
{
public static function suite()
{
@@ -118,6 +121,39 @@
$this->assertFalse( isset( $opt->foo ) );
}
+ public function testStorageProperties()
+ {
+ $storage = new ezcCacheStorageMemcacheWrapper( '.', array( 'host' =>
'localhost', 'port' => 11211, 'ttl' => 10 ) );
+
+ $this->invalidPropertyTest( $storage, 'options', 'wrong value',
'instance of ezcCacheStorageOptions' );
+ $this->missingPropertyTest( $storage, 'no_such_property' );
+ $this->issetPropertyTest( $storage, 'options', true );
+ $this->issetPropertyTest( $storage, 'no_such_property', false );
+ }
+
+ public function testStorageOptions()
+ {
+ $options = new ezcCacheStorageOptions();
+ $storage = new ezcCacheStorageMemcacheWrapper( '.', array( 'host' =>
'localhost', 'port' => 11211, 'ttl' => 10 ) );
+
+ $storage->setOptions( $options );
+ $this->assertEquals( $options, $storage->getOptions() );
+
+ $storage->options = $options;
+ $this->assertEquals( $options, $storage->getOptions() );
+
+ $options = new stdClass();
+ try
+ {
+ $storage->setOptions( $options );
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseValueException $e )
+ {
+ $this->assertEquals( "The value 'O:8:\"stdClass\":0:{}' that you
were trying to assign to setting 'options' is invalid. Allowed values are:
instance of ezcCacheStorageOptions.", $e->getMessage() );
+ }
+ }
+
protected function genericSetFailureTest( $obj, $property, $value )
{
try
Modified: trunk/Cache/tests/storage_plain_test.php
==============================================================================
--- trunk/Cache/tests/storage_plain_test.php [iso-8859-1] (original)
+++ trunk/Cache/tests/storage_plain_test.php [iso-8859-1] Fri Oct 5 12:44:13
2007
@@ -35,7 +35,36 @@
4 => 12.3746,
);
- public static function suite()
+ public function testGetRemainingLifetimeId()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1' );
+
+ $this->assertEquals( true, 8 < $this->storage->getRemainingLifetime(
'1' ) );
+
+ }
+
+ public function testGetRemainingLifetimeAttributes()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->storage->store( '1', 'data1', array( 'type' => 'simple' ) );
+ $this->storage->store( '2', 'data2', array( 'type' => 'simple' ) );
+
+ $this->assertEquals( true, 8 < $this->storage->getRemainingLifetime(
null, array( 'type' => 'simple' ) ) );
+
+ }
+
+ public function testGetRemainingLifetimeNoMatch()
+ {
+ $this->storage->setOptions( array( 'ttl' => 10 ) );
+
+ $this->assertEquals( 0, $this->storage->getRemainingLifetime(
'no_such_id' ) );
+
+ }
+
+ public static function suite()
{
return new PHPUnit_Framework_TestSuite(
"ezcCacheStorageFilePlainTest" );
}
Modified: trunk/Cache/tests/storage_test.php
==============================================================================
--- trunk/Cache/tests/storage_test.php [iso-8859-1] (original)
+++ trunk/Cache/tests/storage_test.php [iso-8859-1] Fri Oct 5 12:44:13 2007
@@ -9,13 +9,15 @@
* @license http://ez.no/licenses/new_bsd New BSD License
*/
+include_once( 'Cache/tests/test.php' );
+
/**
* Abstract base test class for ezcCacheStorage tests.
*
* @package Cache
* @subpackage Tests
*/
-abstract class ezcCacheStorageTest extends ezcTestCase
+abstract class ezcCacheStorageTest extends ezcCacheTest
{
/**
* storageClass
@@ -90,8 +92,10 @@
*/
public function testStoreSuccessWithoutAttributes()
{
- foreach ( $this->data as $id => $dataArr )
- {
+//echo __FUNCTION__;
+ foreach ( $this->data as $id => $dataArr )
+ {
+//var_dump( $id );
$this->storage->store( $id, $dataArr );
$this->assertEquals( $this->storage->countDataItems( $id ), 1,
'Storage file does not exist for ID: <' . $id . '>.' );
}
@@ -104,6 +108,7 @@
*/
public function testStoreSuccessWithAttributes()
{
+//die();
foreach ( $this->data as $id => $dataArr )
{
$attributes = array(
Modified: trunk/Cache/tests/suite.php
==============================================================================
--- trunk/Cache/tests/suite.php [iso-8859-1] (original)
+++ trunk/Cache/tests/suite.php [iso-8859-1] Fri Oct 5 12:44:13 2007
@@ -31,6 +31,10 @@
*/
require_once 'storage_array_test.php';
/**
+ * Require Apc array storage test suite.
+ */
+require_once 'storage_apc_array_test.php';
+/**
* Require array eval storage test suite.
*/
require_once 'storage_evalarray_test.php';
@@ -38,7 +42,15 @@
* Require plain storage test suite.
*/
require_once 'storage_plain_test.php';
-
+/**
+ * Require APC storage test suite.
+ */
+require_once 'storage_apc_plain_test.php';
+/**
+ * Require Memcache storage test suite.
+ */
+require_once 'storage_memcache_plain_test.php';
+
/**
* Test suite for Cache package.
*
@@ -56,6 +68,9 @@
$this->addTest( ezcCacheStorageFileEvalArrayTest::suite() );
$this->addTest( ezcCacheStorageFilePlainTest::suite() );
$this->addTest( ezcCacheStorageFileTest::suite() );
+ $this->addTest( ezcCacheStorageApcPlainTest::suite() );
+ $this->addTest( ezcCacheStorageFileApcArrayTest::suite() );
+ $this->addTest( ezcCacheStorageMemcachePlainTest::suite() );
$this->addTest( ezcCacheStorageOptionsTest::suite() );
$this->addTest( ezcCacheStorageFileOptionsTest::suite() );
$this->addTest( ezcCacheManagerTest::suite() );
Added: trunk/Cache/tests/test.php
==============================================================================
--- trunk/Cache/tests/test.php (added)
+++ trunk/Cache/tests/test.php [iso-8859-1] Fri Oct 5 12:44:13 2007
@@ -1,0 +1,280 @@
+<?php
+/**
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ * @filesource
+ * @package Cache
+ * @version //autogen//
+ * @subpackage Tests
+ */
+
+/**
+ * @package Cache
+ * @version //autogen//
+ * @subpackage Tests
+ * @access private
+ */
+class ezcCacheTest extends ezcTestCase
+{
+ /**
+ * Tests assigning an invalid value to a property.
+ *
+ * Expects that an ezcBaseValueException is raised by the invalid value.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param mixed $value The value to try to assign to $property
+ * @param string $allowedValue The values which are allowed for $property
+ */
+ protected function invalidPropertyTest( $properties, $property, $value,
$allowedValue )
+ {
+ try
+ {
+ $properties->$property = $value;
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseValueException $e )
+ {
+ $value = is_array( $value ) ? serialize( $value ) : $value;
+ $this->assertEquals( "The value '{$value}' that you were trying to
assign to setting '{$property}' is invalid. Allowed values are:
{$allowedValue}.", $e->getMessage() );
+ }
+ }
+
+ /**
+ * Tests assigning a value to a missing property.
+ *
+ * Expects that an ezcBasePropertyNotFoundException is raised by the
missing
+ * property.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ */
+ protected function missingPropertyTest( $properties, $property )
+ {
+ try
+ {
+ $properties->$property = null;
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBasePropertyNotFoundException $e )
+ {
+ $this->assertEquals( "No such property name '{$property}'.",
$e->getMessage() );
+ }
+
+ // workaround around a bug (?) - __isset() in ezcBaseOptions complains
and warns
+ // that the second parameter for array_exists() must be an array or an
object
+ if ( !$properties instanceof ezcBaseOptions )
+ {
+ try
+ {
+ $value = $properties->$property;
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBasePropertyNotFoundException $e )
+ {
+ $this->assertEquals( "No such property name '{$property}'.",
$e->getMessage() );
+ }
+ }
+ }
+
+ /**
+ * Tests if a property is set.
+ *
+ * Compares the result of isset() with $value.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param bool $value True if expecting that $property is set, false
otherwise
+ */
+ protected function issetPropertyTest( $properties, $property, $value )
+ {
+ $this->assertEquals( $value, isset( $properties->$property ) );
+ }
+
+ /**
+ * Tests assigning a non-existent path to a property.
+ *
+ * Expects that an ezcBaseFileNotFoundException is raised by the missing
+ * path.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A path which does not exist
+ */
+ protected function missingFileTest( $properties, $property, $value )
+ {
+ try
+ {
+ $properties->$property = $value;
+ $this->fail( "Expected exception was not thrown" );
+ }
+ catch ( ezcBaseFileNotFoundException $e )
+ {
+ $this->assertEquals( "The file '{$value}' could not be found.",
$e->getMessage() );
+ }
+ }
+
+ /**
+ * Tests assigning an unreadable path to a property.
+ *
+ * Expects that an ezcBaseFilePermissionException is raised by the
unreadable
+ * path.
+ *
+ * This function creates a temporary file and makes it unreadable.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A filename without paths or slashes
+ */
+ protected function unreadableFileTest( $properties, $property, $value )
+ {
+ $tempDir = $this->createTempDir( get_class( $this ) );
+ $path = $tempDir . DIRECTORY_SEPARATOR . $value;
+ $fh = fopen( $path, "wb" );
+ fwrite( $fh, "some values" );
+ fclose( $fh );
+ chmod( $path, 0 );
+
+ try
+ {
+ $properties->$property = $path;
+ $this->removeTempDir();
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseFilePermissionException $e )
+ {
+ $this->assertEquals( "The file '{$path}' can not be opened for
reading.", $e->getMessage() );
+ }
+
+ $this->removeTempDir();
+ }
+
+ /**
+ * Tests assigning an unwritable path to a property.
+ *
+ * Expects that an ezcBaseFilePermissionException is raised by the
unwritable
+ * path.
+ *
+ * This function creates a temporary file and makes it unwritable.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A filename without paths or slashes
+ */
+ protected function unwritableFileTest( $properties, $property, $value )
+ {
+ $tempDir = $this->createTempDir( get_class( $this ) );
+ $path = $tempDir . DIRECTORY_SEPARATOR . $value;
+ $fh = fopen( $path, "wb" );
+ fwrite( $fh, "some values" );
+ fclose( $fh );
+ chmod( $path, 0 );
+
+ try
+ {
+ $properties->$property = $path;
+ $this->removeTempDir();
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseFilePermissionException $e )
+ {
+ $this->assertEquals( "The file '{$path}' can not be opened for
writing.", $e->getMessage() );
+ }
+
+ $this->removeTempDir();
+ }
+
+ /**
+ * Tests assigning a non-existent directory to a property.
+ *
+ * Expects that an ezcBaseFileNotFoundException is raised by the missing
+ * directory.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A directory which does not exist
+ */
+ protected function missingDirTest( $properties, $property, $value )
+ {
+ try
+ {
+ $properties->$property = $value;
+ $this->fail( "Expected exception was not thrown" );
+ }
+ catch ( ezcBaseFileNotFoundException $e )
+ {
+ $this->assertEquals( "The file '{$value}' could not be found.",
$e->getMessage() );
+ }
+ }
+
+ /**
+ * Tests assigning an unreadable directory to a property.
+ *
+ * Expects that an ezcBaseFilePermissionException is raised by the
unreadable
+ * path.
+ *
+ * This function creates a temporary directory and makes it unreadable.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A directory name without paths or slashes
+ */
+ protected function unreadableDirTest( $properties, $property, $value )
+ {
+ $tempDir = $this->createTempDir( get_class( $this ) );
+ $path = $tempDir . DIRECTORY_SEPARATOR . $value;
+ mkdir( $path );
+ chmod( $path, 0 );
+
+ try
+ {
+ $properties->$property = $path;
+ chmod( $path, 0777 );
+ $this->removeTempDir();
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseFilePermissionException $e )
+ {
+ $this->assertEquals( "The file '{$path}' can not be opened for
reading.", $e->getMessage() );
+ }
+
+ chmod( $path, 0777 );
+ $this->removeTempDir();
+ }
+
+ /**
+ * Tests assigning an unwritable directory to a property.
+ *
+ * Expects that an ezcBaseFilePermissionException is raised by the
unwritable
+ * path.
+ *
+ * This function creates a temporary directory and makes it unwritable.
+ *
+ * @param object $properties An object which implements properties access
+ * @param string $property The property of the $properties object to test
+ * @param string $value A directory name without paths or slashes
+ */
+ protected function unwritableDirTest( $properties, $property, $value )
+ {
+ $tempDir = $this->createTempDir( get_class( $this ) );
+ $path = $tempDir . DIRECTORY_SEPARATOR . $value;
+ mkdir( $path );
+ chmod( $path, 0444 );
+
+ try
+ {
+ $properties->$property = $path;
+ chmod( $path, 0777 );
+ $this->removeTempDir();
+ $this->fail( "Expected exception was not thrown." );
+ }
+ catch ( ezcBaseFilePermissionException $e )
+ {
+ $this->assertEquals( "The file '{$path}' can not be opened for
writing.", $e->getMessage() );
+ }
+
+ chmod( $path, 0777 );
+ $this->removeTempDir();
+ }
+}
+?>
Propchange: trunk/Cache/tests/test.php
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/Cache/tests/wrappers/apc_array_wrapper.php
==============================================================================
--- trunk/Cache/tests/wrappers/apc_array_wrapper.php (added)
+++ trunk/Cache/tests/wrappers/apc_array_wrapper.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -1,0 +1,89 @@
+<?php
+/**
+ * File containing the ezcCacheStorageFileApcArrayWrapper class.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ * @filesource
+ */
+
+/**
+ * Access to the $registry and $backend fields. For testing purposes only.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ */
+class ezcCacheStorageFileApcArrayWrapper extends ezcCacheStorageFileApcArray
+{
+ /**
+ * Sets the static field $registry with the provided value.
+ *
+ * @param array(string=>mixed) $registry
+ */
+ public function setRegistry( array $registry = array() )
+ {
+ $this->registry = $registry;
+ }
+
+ /**
+ * Returns the static field $registry.
+ *
+ * @return array(string=>mixed)
+ */
+ public function getRegistry()
+ {
+ return $this->registry;
+ }
+
+ /**
+ * Sets the backend with the provided value.
+ *
+ * @param ezcCacheApcBackend $backend
+ */
+ public function setBackend( $backend )
+ {
+ $this->backend = $backend;
+ }
+
+ /**
+ * Fetch data from the cache.
+ * This method does the fetching of the data itself (or false on failure).
+ *
+ * @param string $identifier The file to fetch data from
+ * @param bool $useApc Use APC or the file system
+ * @return mixed The fetched data or false on failure
+ */
+ public function fetchData( $identifier, $useApc = false )
+ {
+ return parent::fetchData( $identifier, $useApc );
+ }
+
+ /**
+ * Returns the data because there is no need to prepare it.
+ *
+ * @param mixed $data Simple type or array
+ * @param bool $useApc Use APC or not
+ * @return mixed $data
+ */
+ public function prepareData( $data, $useApc = false )
+ {
+ return parent::prepareData( $data, $useApc );
+ }
+
+ /**
+ * Calculates the lifetime remaining for a cache object.
+ *
+ * @param string $filename The file to calculate the remaining lifetime for
+ * @param bool $useApc Use APC or not
+ * @return int The remaining lifetime in seconds (0 if no time remaining)
+ */
+ public function calcLifetime( $filename, $useApc = false )
+ {
+ return parent::calcLifetime( $filename, $useApc );
+ }
+}
+?>
Propchange: trunk/Cache/tests/wrappers/apc_array_wrapper.php
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/Cache/tests/wrappers/apc_wrapper.php
==============================================================================
--- trunk/Cache/tests/wrappers/apc_wrapper.php (added)
+++ trunk/Cache/tests/wrappers/apc_wrapper.php [iso-8859-1] Fri Oct 5 12:44:13
2007
@@ -1,0 +1,52 @@
+<?php
+/**
+ * File containing the ezcCacheStorageApcWrapper class.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ * @filesource
+ */
+
+/**
+ * Access to the $registry and $apc fields. For testing purposes only.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ */
+class ezcCacheStorageApcWrapper extends ezcCacheStorageApcPlain
+{
+ /**
+ * Sets the static field $registry with the provided value.
+ *
+ * @param array(string=>mixed) $registry
+ */
+ public function setRegistry( array $registry = array() )
+ {
+ $this->registry = $registry;
+ }
+
+ /**
+ * Returns the static field $registry.
+ *
+ * @return array(string=>mixed)
+ */
+ public function getRegistry()
+ {
+ return $this->registry;
+ }
+
+ /**
+ * Sets the backend with the provided value.
+ *
+ * @param ezcCacheApcBackend $backend
+ */
+ public function setBackend( $backend )
+ {
+ $this->backend = $backend;
+ }
+}
+?>
Propchange: trunk/Cache/tests/wrappers/apc_wrapper.php
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/Cache/tests/wrappers/memcache_wrapper.php
==============================================================================
--- trunk/Cache/tests/wrappers/memcache_wrapper.php (added)
+++ trunk/Cache/tests/wrappers/memcache_wrapper.php [iso-8859-1] Fri Oct 5
12:44:13 2007
@@ -1,0 +1,42 @@
+<?php
+/**
+ * File containing the ezcCacheStorageMemcacheWrapper class.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ * @copyright Copyright (C) 2005-2007 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ * @filesource
+ */
+
+/**
+ * Access to the $registry field. For testing purposes only.
+ *
+ * @package Cache
+ * @version //autogentag//
+ * @subpackage Tests
+ */
+class ezcCacheStorageMemcacheWrapper extends ezcCacheStorageMemcachePlain
+{
+ /**
+ * Sets the static field $registry with the provided value.
+ *
+ * @param array(string=>mixed) $registry
+ */
+ public function setRegistry( array $registry = array() )
+ {
+ $this->registry = $registry;
+ }
+
+ /**
+ * Returns the static field $registry.
+ *
+ * @return array(string=>mixed)
+ */
+ public function getRegistry()
+ {
+ return $this->registry;
+ }
+}
+?>
Propchange: trunk/Cache/tests/wrappers/memcache_wrapper.php
------------------------------------------------------------------------------
svn:eol-style = native
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components