Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Style fixes to make code (more) readable.

  • Loading branch information...
commit 884e17bb0fe8cc81e822725967feebdf835e7f11 1 parent f1dfc46
Ian MacLennan authored
Showing with 19 additions and 24 deletions.
  1. +19 −24 tests/suites/unit/joomla/cache/storage/JCacheStorageMemcacheTest.php
View
43 tests/suites/unit/joomla/cache/storage/JCacheStorageMemcacheTest.php
@@ -36,46 +36,41 @@ class JCacheStorageMemcacheTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
- $memcachetest = false;
include_once JPATH_PLATFORM.'/joomla/cache/storage.php';
include_once JPATH_PLATFORM.'/joomla/cache/storage/memcache.php';
- if ((extension_loaded('memcache') && class_exists('Memcache')) != true ) {
+ $memcachetest = false;
+
+ if (!extension_loaded('memcache') || !class_exists('Memcache'))
+ {
$this->memcacheAvailable = false;
}
- else {
+ else
+ {
$config = JFactory::getConfig();
$host = $config->get('memcache_server_host', 'localhost');
$port = $config->get('memcache_server_port', 11211);
$memcache = new Memcache;
- $memcachetest = @$memcache->connect($host, $port); }
-
- if (!$memcachetest) {
- $this->memcacheAvailable = false;
- }
- else {
- $this->memcacheAvailable = true;
- }
+ $memcachetest = @$memcache->connect($host, $port);
+ }
+ if (!$memcachetest)
+ {
+ $this->memcacheAvailable = false;
+ }
+ else
+ {
+ $this->memcacheAvailable = true;
+ }
- if ($this->memcacheAvailable) {
+ if ($this->memcacheAvailable)
+ {
$this->object = JCacheStorage::getInstance('memcache');
}
}
/**
- * Tears down the fixture, for example, closes a network connection.
- * This method is called after a test is executed.
- *
- * @return void
- * @access protected
- */
- protected function tearDown()
- {
- }
-
- /**
* @return void
* @todo Implement testGetConnection().
*/
@@ -224,4 +219,4 @@ public function testGetCacheId()
}
}
}
-?>
+
Please sign in to comment.
Something went wrong with that request. Please try again.