From 2c7ef78be2b813a61bee93d08881b25eba83aba1 Mon Sep 17 00:00:00 2001 From: Filippo Tessarotto Date: Fri, 14 Nov 2014 09:27:48 +0100 Subject: [PATCH] CS Fix --- AbstractAdapterTest.php | 1 - AbstractDbaTest.php | 1 - AbstractZendServerTest.php | 1 - ApcTest.php | 1 - BlackHoleTest.php | 1 - CommonAdapterTest.php | 13 ++++++------- DbaDb2Test.php | 1 - DbaDb3Test.php | 1 - DbaDb4Test.php | 1 - DbaFlatfileTest.php | 1 - DbaGdbmTest.php | 1 - DbaInifileTest.php | 1 - DbaQdbmTest.php | 1 - FilesystemTest.php | 9 ++++++--- KeyListIteratorTest.php | 1 - MemcacheResourceManagerTest.php | 1 - MemcacheTest.php | 1 - MemcachedResourceManagerTest.php | 1 - MemcachedTest.php | 1 - MemoryTest.php | 1 - RedisTest.php | 2 -- SessionTest.php | 1 - WinCacheTest.php | 1 - XCacheTest.php | 1 - ZendServerDiskTest.php | 1 - ZendServerShmTest.php | 1 - 26 files changed, 12 insertions(+), 35 deletions(-) diff --git a/AbstractAdapterTest.php b/AbstractAdapterTest.php index f986faf..0dbf070 100644 --- a/AbstractAdapterTest.php +++ b/AbstractAdapterTest.php @@ -17,7 +17,6 @@ */ class AbstractAdapterTest extends \PHPUnit_Framework_TestCase { - /** * Mock of the abstract storage adapter * diff --git a/AbstractDbaTest.php b/AbstractDbaTest.php index c6d2a4f..10acdd4 100644 --- a/AbstractDbaTest.php +++ b/AbstractDbaTest.php @@ -16,7 +16,6 @@ */ abstract class AbstractDbaTest extends CommonAdapterTest { - protected $handler; protected $temporaryDbaFile; diff --git a/AbstractZendServerTest.php b/AbstractZendServerTest.php index 860cb78..1d695cf 100644 --- a/AbstractZendServerTest.php +++ b/AbstractZendServerTest.php @@ -17,7 +17,6 @@ */ class AbstractZendServerTest extends \PHPUnit_Framework_TestCase { - public function setUp() { $this->_options = new AdapterOptions(); diff --git a/ApcTest.php b/ApcTest.php index 6356be7..62e8c11 100644 --- a/ApcTest.php +++ b/ApcTest.php @@ -16,7 +16,6 @@ */ class ApcTest extends CommonAdapterTest { - /** * Restore 'apc.use_request_time' * diff --git a/BlackHoleTest.php b/BlackHoleTest.php index 8b12264..e0eb5c1 100644 --- a/BlackHoleTest.php +++ b/BlackHoleTest.php @@ -34,7 +34,6 @@ */ class BlackHoleTest extends \PHPUnit_Framework_TestCase { - /** * The storage adapter * diff --git a/CommonAdapterTest.php b/CommonAdapterTest.php index 6e98d80..df03e7a 100644 --- a/CommonAdapterTest.php +++ b/CommonAdapterTest.php @@ -31,7 +31,6 @@ */ abstract class CommonAdapterTest extends \PHPUnit_Framework_TestCase { - /** * The storage adapter * @@ -751,9 +750,9 @@ public function testCheckAndSetItem() public function testIncrementItem() { - $this->assertTrue($this->_storage->setItem('counter', 10)); - $this->assertEquals(15, $this->_storage->incrementItem('counter', 5)); - $this->assertEquals(15, $this->_storage->getItem('counter')); + $this->assertTrue($this->_storage->setItem('counter', 10)); + $this->assertEquals(15, $this->_storage->incrementItem('counter', 5)); + $this->assertEquals(15, $this->_storage->getItem('counter')); } public function testIncrementItemInitialValue() @@ -798,9 +797,9 @@ public function testIncrementItemsReturnsEmptyArrayIfNonWritable() public function testDecrementItem() { - $this->assertTrue($this->_storage->setItem('counter', 30)); - $this->assertEquals(25, $this->_storage->decrementItem('counter', 5)); - $this->assertEquals(25, $this->_storage->getItem('counter')); + $this->assertTrue($this->_storage->setItem('counter', 30)); + $this->assertEquals(25, $this->_storage->decrementItem('counter', 5)); + $this->assertEquals(25, $this->_storage->getItem('counter')); } public function testDecrementItemInitialValue() diff --git a/DbaDb2Test.php b/DbaDb2Test.php index bf7033b..62c67bd 100644 --- a/DbaDb2Test.php +++ b/DbaDb2Test.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaDb3Test.php b/DbaDb3Test.php index e9c1318..c859f53 100644 --- a/DbaDb3Test.php +++ b/DbaDb3Test.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaDb4Test.php b/DbaDb4Test.php index e5011bb..5e7a2f7 100644 --- a/DbaDb4Test.php +++ b/DbaDb4Test.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaFlatfileTest.php b/DbaFlatfileTest.php index 52b4964..ef1cc97 100644 --- a/DbaFlatfileTest.php +++ b/DbaFlatfileTest.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaGdbmTest.php b/DbaGdbmTest.php index 097f309..7d91a3b 100644 --- a/DbaGdbmTest.php +++ b/DbaGdbmTest.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaInifileTest.php b/DbaInifileTest.php index 30726cc..aafc1ed 100644 --- a/DbaInifileTest.php +++ b/DbaInifileTest.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/DbaQdbmTest.php b/DbaQdbmTest.php index 483bd13..bbbba8d 100644 --- a/DbaQdbmTest.php +++ b/DbaQdbmTest.php @@ -9,7 +9,6 @@ namespace ZendTest\Cache\Storage\Adapter; -use Zend\Cache; /** * @group Zend_Cache diff --git a/FilesystemTest.php b/FilesystemTest.php index 70c945c..6e60358 100644 --- a/FilesystemTest.php +++ b/FilesystemTest.php @@ -18,7 +18,6 @@ */ class FilesystemTest extends CommonAdapterTest { - protected $_tmpCacheDir; protected $_umask; @@ -130,7 +129,9 @@ public function testSetCacheDirNotWritableException() // create a not writable temporaty directory $testDir = tempnam(sys_get_temp_dir(), 'ZendTest'); - unlink($testDir); mkdir($testDir); chmod($testDir, 0557); + unlink($testDir); + mkdir($testDir); + chmod($testDir, 0557); try { $this->_options->setCacheDir($testDir); @@ -157,7 +158,9 @@ public function testSetCacheDirNotReadableException() // create a not readable temporaty directory $testDir = tempnam(sys_get_temp_dir(), 'ZendTest'); - unlink($testDir); mkdir($testDir); chmod($testDir, 0337); + unlink($testDir); + mkdir($testDir); + chmod($testDir, 0337); try { $this->_options->setCacheDir($testDir); diff --git a/KeyListIteratorTest.php b/KeyListIteratorTest.php index 9328291..f462751 100644 --- a/KeyListIteratorTest.php +++ b/KeyListIteratorTest.php @@ -17,7 +17,6 @@ */ class KeyListIteratorTest extends \PHPUnit_Framework_TestCase { - public function testCount() { $keys = array('key1', 'key2', 'key3'); diff --git a/MemcacheResourceManagerTest.php b/MemcacheResourceManagerTest.php index f788c1b..ed0a8ee 100644 --- a/MemcacheResourceManagerTest.php +++ b/MemcacheResourceManagerTest.php @@ -20,7 +20,6 @@ */ class MemcacheResourceManagerTest extends \PHPUnit_Framework_TestCase { - /** * The resource manager * diff --git a/MemcacheTest.php b/MemcacheTest.php index 0055187..2d7a48c 100644 --- a/MemcacheTest.php +++ b/MemcacheTest.php @@ -16,7 +16,6 @@ */ class MemcacheTest extends CommonAdapterTest { - public function setUp() { if (!defined('TESTS_ZEND_CACHE_MEMCACHE_ENABLED') || !TESTS_ZEND_CACHE_MEMCACHE_ENABLED) { diff --git a/MemcachedResourceManagerTest.php b/MemcachedResourceManagerTest.php index 9c068e5..fa6cc78 100644 --- a/MemcachedResourceManagerTest.php +++ b/MemcachedResourceManagerTest.php @@ -20,7 +20,6 @@ */ class MemcachedResourceManagerTest extends \PHPUnit_Framework_TestCase { - /** * The resource manager * diff --git a/MemcachedTest.php b/MemcachedTest.php index d1dcc34..54e0289 100644 --- a/MemcachedTest.php +++ b/MemcachedTest.php @@ -16,7 +16,6 @@ */ class MemcachedTest extends CommonAdapterTest { - public function setUp() { if (!defined('TESTS_ZEND_CACHE_MEMCACHED_ENABLED') || !TESTS_ZEND_CACHE_MEMCACHED_ENABLED) { diff --git a/MemoryTest.php b/MemoryTest.php index 96fcb1a..cf06459 100644 --- a/MemoryTest.php +++ b/MemoryTest.php @@ -16,7 +16,6 @@ */ class MemoryTest extends CommonAdapterTest { - public function setUp() { // instantiate memory adapter diff --git a/RedisTest.php b/RedisTest.php index c5bc5de..89dc8f9 100644 --- a/RedisTest.php +++ b/RedisTest.php @@ -14,7 +14,6 @@ class RedisTest extends CommonAdapterTest { - /** * * @var Cache\Storage\Adapter\RedisOptions @@ -313,5 +312,4 @@ public function testOptionsGetSetPassword() $this->_options->setPassword($password); $this->assertEquals($password, $this->_options->getPassword(), 'Password was set incorrectly using RedisOptions'); } - } diff --git a/SessionTest.php b/SessionTest.php index c2a6b58..4079f87 100644 --- a/SessionTest.php +++ b/SessionTest.php @@ -19,7 +19,6 @@ */ class SessionTest extends CommonAdapterTest { - public function setUp() { $_SESSION = array(); diff --git a/WinCacheTest.php b/WinCacheTest.php index db01181..24cc51a 100644 --- a/WinCacheTest.php +++ b/WinCacheTest.php @@ -17,7 +17,6 @@ */ class WinCacheTest extends CommonAdapterTest { - public function setUp() { if (!defined('TESTS_ZEND_CACHE_WINCACHE_ENABLED') || !TESTS_ZEND_CACHE_WINCACHE_ENABLED) { diff --git a/XCacheTest.php b/XCacheTest.php index fc2eac7..c7abf34 100644 --- a/XCacheTest.php +++ b/XCacheTest.php @@ -16,7 +16,6 @@ */ class XCacheTest extends CommonAdapterTest { - protected $backupServerArray; public function setUp() diff --git a/ZendServerDiskTest.php b/ZendServerDiskTest.php index c51b9d9..d429f9e 100644 --- a/ZendServerDiskTest.php +++ b/ZendServerDiskTest.php @@ -17,7 +17,6 @@ */ class ZendServerDiskTest extends CommonAdapterTest { - public function setUp() { if (!defined('TESTS_ZEND_CACHE_ZEND_SERVER_ENABLED') || !TESTS_ZEND_CACHE_ZEND_SERVER_ENABLED) { diff --git a/ZendServerShmTest.php b/ZendServerShmTest.php index 4316b21..3261b2f 100644 --- a/ZendServerShmTest.php +++ b/ZendServerShmTest.php @@ -17,7 +17,6 @@ */ class ZendServerShmTest extends CommonAdapterTest { - public function setUp() { if (!defined('TESTS_ZEND_CACHE_ZEND_SERVER_ENABLED') || !TESTS_ZEND_CACHE_ZEND_SERVER_ENABLED) {