diff --git a/tests/unit/core/case/database.php b/tests/unit/core/case/database.php index 160dc26edc065..efc4f527246a9 100644 --- a/tests/unit/core/case/database.php +++ b/tests/unit/core/case/database.php @@ -485,7 +485,6 @@ protected function saveFactoryState() protected function setErrorHandlers($errorHandlers) { $mode = null; - $options = null; foreach ($errorHandlers as $type => $params) { diff --git a/tests/unit/core/mock/database/driver.php b/tests/unit/core/mock/database/driver.php index 424c5e2dff7ca..cd3ceb00c41f0 100644 --- a/tests/unit/core/mock/database/driver.php +++ b/tests/unit/core/mock/database/driver.php @@ -20,7 +20,7 @@ class TestMockDatabaseDriver * @var mixed * @since 11.3 */ - public static $lastQuery = null; + public static $lastQuery; /** * Creates and instance of the mock JDatabaseDriver object. diff --git a/tests/unit/suites/database/driver/mysql/JDatabaseExporterMysqlTest.php b/tests/unit/suites/database/driver/mysql/JDatabaseExporterMysqlTest.php index feae207646655..302b432389fbf 100644 --- a/tests/unit/suites/database/driver/mysql/JDatabaseExporterMysqlTest.php +++ b/tests/unit/suites/database/driver/mysql/JDatabaseExporterMysqlTest.php @@ -29,7 +29,7 @@ class JDatabaseExporterMysqlTest extends TestCase /** * @var JDatabaseDriverMysql The mocked database object for use by test methods. */ - protected $dbo = null; + protected $dbo; /** * This method is called before the first test of this test class is run. diff --git a/tests/unit/suites/database/driver/mysqli/JDatabaseExporterMysqliTest.php b/tests/unit/suites/database/driver/mysqli/JDatabaseExporterMysqliTest.php index 3e5006eb35a3a..df92d2e90b13f 100644 --- a/tests/unit/suites/database/driver/mysqli/JDatabaseExporterMysqliTest.php +++ b/tests/unit/suites/database/driver/mysqli/JDatabaseExporterMysqliTest.php @@ -18,7 +18,7 @@ class JDatabaseExporterMysqliTest extends TestCase /** * @var JDatabaseDriverMysqli The mocked database object for use by test methods. */ - protected $dbo = null; + protected $dbo; /** * Sets up the testing conditions diff --git a/tests/unit/suites/database/driver/pdomysql/JDatabaseExporterPdomysqlTest.php b/tests/unit/suites/database/driver/pdomysql/JDatabaseExporterPdomysqlTest.php index 87d79d3de0562..47e444c96893a 100644 --- a/tests/unit/suites/database/driver/pdomysql/JDatabaseExporterPdomysqlTest.php +++ b/tests/unit/suites/database/driver/pdomysql/JDatabaseExporterPdomysqlTest.php @@ -20,7 +20,7 @@ class JDatabaseExporterPdomysqlTest extends PHPUnit_Framework_TestCase * @var object The mocked database object for use by test methods. * @since 3.4 */ - protected $dbo = null; + protected $dbo; /** * Sets up the testing conditions diff --git a/tests/unit/suites/database/driver/postgresql/JDatabaseExporterPostgresqlTest.php b/tests/unit/suites/database/driver/postgresql/JDatabaseExporterPostgresqlTest.php index 30b0db0f57e87..72351be9e99ea 100644 --- a/tests/unit/suites/database/driver/postgresql/JDatabaseExporterPostgresqlTest.php +++ b/tests/unit/suites/database/driver/postgresql/JDatabaseExporterPostgresqlTest.php @@ -18,7 +18,7 @@ class JDatabaseExporterPostgresqlTest extends TestCase /** * @var JDatabaseDriverPostgresql The mocked database object for use by test methods. */ - protected $dbo = null; + protected $dbo; /** * @var string A query string or object. diff --git a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMock.php b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMock.php index 29ae01e031b1d..8abfbf213c9d5 100644 --- a/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMock.php +++ b/tests/unit/suites/libraries/joomla/cache/storage/JCacheStorageMock.php @@ -46,9 +46,9 @@ public function get($id, $group, $checkTime = true) { $cache_id = $this->_getCacheId($id, $group); - if (isset($this->_storage[$id])) + if (isset($this->_storage[$cache_id])) { - return $this->_storage[$id]; + return $this->_storage[$cache_id]; } return false; @@ -69,7 +69,7 @@ public function store($id, $group, $data) { $cache_id = $this->_getCacheId($id, $group); - return ($this->_storage[$id] = $data); + return ($this->_storage[$cache_id] = $data); } /** @@ -85,7 +85,7 @@ public function store($id, $group, $data) public function remove($id, $group) { $cache_id = $this->_getCacheId($id, $group); - unset($this->_storage[$id]); + unset($this->_storage[$cache_id]); } /** @@ -105,18 +105,6 @@ public function clean($group, $mode = null) return ($this->_storage = array()); } - /** - * Test to see if the storage handler is available. - * - * @return boolean True on success, false otherwise - * - * @since 12.1 - */ - public static function isSupported() - { - return true; - } - /** * Get a cache_id string from an id/group pair * diff --git a/tests/unit/suites/libraries/joomla/feed/stubs/JFeedParserMock.php b/tests/unit/suites/libraries/joomla/feed/stubs/JFeedParserMock.php index 0db8c016eaac4..b1e28398447eb 100644 --- a/tests/unit/suites/libraries/joomla/feed/stubs/JFeedParserMock.php +++ b/tests/unit/suites/libraries/joomla/feed/stubs/JFeedParserMock.php @@ -20,7 +20,7 @@ class JFeedParserMock extends JFeedParser * @var mixed The value to return when the parse method is called. * @since 12.3 */ - public static $parseReturn = null; + public static $parseReturn; /** * Do Nothing. diff --git a/tests/unit/suites/libraries/joomla/google/JGoogleAuthOauth2Test.php b/tests/unit/suites/libraries/joomla/google/JGoogleAuthOauth2Test.php index 29b27a4e983c8..563ddf0464cb7 100644 --- a/tests/unit/suites/libraries/joomla/google/JGoogleAuthOauth2Test.php +++ b/tests/unit/suites/libraries/joomla/google/JGoogleAuthOauth2Test.php @@ -51,7 +51,7 @@ class JGoogleAuthOauth2Test extends TestCase * * @var int */ - private static $closed = null; + private static $closed; /** * Backup of the SERVER superglobal diff --git a/tests/unit/suites/libraries/joomla/language/JLanguageTest.php b/tests/unit/suites/libraries/joomla/language/JLanguageTest.php index 1e420b9c3b57b..ea1ff9fc11abc 100644 --- a/tests/unit/suites/libraries/joomla/language/JLanguageTest.php +++ b/tests/unit/suites/libraries/joomla/language/JLanguageTest.php @@ -1200,13 +1200,6 @@ public function testParseXMLLanguageFile() JLanguage::parseXMLLanguageFile($path), 'Line: ' . __LINE__ ); - - $path2 = __DIR__ . '/data/language/es-ES/es-ES.xml'; - $this->assertEquals( - $option, - JLanguage::parseXMLLanguageFile($path), - 'Line: ' . __LINE__ - ); } /** diff --git a/tests/unit/suites/libraries/joomla/oauth2/JOauth2ClientTest.php b/tests/unit/suites/libraries/joomla/oauth2/JOauth2ClientTest.php index ba74cd87f8975..e7febdb0d5a40 100644 --- a/tests/unit/suites/libraries/joomla/oauth2/JOauth2ClientTest.php +++ b/tests/unit/suites/libraries/joomla/oauth2/JOauth2ClientTest.php @@ -48,7 +48,7 @@ class JOAuth2ClientTest extends TestCase * * @var int */ - private static $closed = null; + private static $closed; /** * Backup of the SERVER superglobal