Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Style fixes to make code (more) readable. #1570

Merged
merged 1 commit into from

2 participants

@ianmacl

Just cleaning up the code a little bit.

@pasamio pasamio merged commit 939cba0 into joomla:staging
@pasamio

Merged. Was trying to work out why this wasn't triggering warnings but it's the tests directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 6, 2012
  1. Style fixes to make code (more) readable.

    Ian MacLennan authored
This page is out of date. Refresh to see the latest.
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()
}
}
}
-?>
+
Something went wrong with that request. Please try again.