Skip to content
Browse files

Move JDate to its own package to make it autoloadable.

  • Loading branch information...
1 parent 1708238 commit 78677f909f0c4dcf82e6b2e5f869e82310955bad @realityking committed Apr 9, 2012
View
4 libraries/joomla/utilities/date.php → libraries/joomla/date/date.php
@@ -1,7 +1,7 @@
<?php
/**
* @package Joomla.Platform
- * @subpackage Utilities
+ * @subpackage Date
*
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
@@ -27,7 +27,7 @@
* @property-read string $year Y - A full numeric representation of a year, 4 digits.
*
* @package Joomla.Platform
- * @subpackage Utilities
+ * @subpackage Date
* @since 11.1
*/
class JDate extends DateTime
View
1 libraries/joomla/factory.php
@@ -470,7 +470,6 @@ public static function getURI($uri = 'SERVER')
*/
public static function getDate($time = 'now', $tzOffset = null)
{
- jimport('joomla.utilities.date');
static $classname;
static $mainLocale;
View
2 libraries/joomla/log/entry.php
@@ -9,8 +9,6 @@
defined('JPATH_PLATFORM') or die;
-jimport('joomla.utilities.date');
-
/**
* Joomla! Log Entry class
*
View
20 ...uites/unit/joomla/utilities/JDateTest.php → tests/suites/unit/joomla/date/JDateTest.php
@@ -1,17 +1,17 @@
<?php
/**
* @package Joomla.UnitTest
- * @subpackage Utilities
+ * @subpackage Date
* @copyright Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-require_once JPATH_PLATFORM . '/joomla/utilities/date.php';
+require_once JPATH_PLATFORM . '/joomla/date/date.php';
/**
* Tests for JDate class.
*
* @package Joomla.UnitTest
- * @subpackage Utilities
+ * @subpackage Date
* @since 11.3
*/
class JDateTest extends TestCaseDatabase
@@ -495,6 +495,7 @@ function tearDown()
*
* @dataProvider cases__construct
* @since 11.3
+ * @covers JDate::__construct
*/
public function test__construct($date, $tz, $expectedTime)
{
@@ -523,6 +524,7 @@ public function test__construct($date, $tz, $expectedTime)
*
* @dataProvider cases__get
* @since 11.3
+ * @covers JDate::__get
*/
public function test__get($date, $property, $expected)
{
@@ -540,6 +542,7 @@ public function test__get($date, $property, $expected)
* @return void
*
* @since 11.3
+ * @covers JDate::__toString
*/
public function test__toString()
{
@@ -563,6 +566,7 @@ public function test__toString()
*
* @dataProvider casesToString
* @since 11.3
+ * @covers JDate::__toString
*/
public function testToString($format, $expectedTime)
{
@@ -583,6 +587,7 @@ public function testToString($format, $expectedTime)
* @return void
*
* @since 11.3
+ * @covers JDate::getInstance
*/
public function testGetInstance()
{
@@ -611,6 +616,7 @@ public function testGetInstance()
*
* @dataProvider casesGetOffsetFromGMT
* @since 11.3
+ * @covers JDate::getOffsetFromGMT
*/
public function testGetOffsetFromGMT($tz, $setTime, $hours, $expected)
{
@@ -646,6 +652,7 @@ public function testGetOffsetFromGMT($tz, $setTime, $hours, $expected)
*
* @dataProvider casesFormat
* @since 11.3
+ * @covers JDate::format
*/
public function testFormat($format, $local, $expected)
{
@@ -667,6 +674,7 @@ public function testFormat($format, $local, $expected)
*
* @dataProvider casesToRFC822
* @since 11.3
+ * @covers JDate::toRFC822
*/
public function testToRFC822($tz, $setTime, $local, $expected)
{
@@ -700,7 +708,8 @@ public function testToRFC822($tz, $setTime, $local, $expected)
*
* @dataProvider casesToISO8601
* @since 11.3
- **/
+ * @covers JDate::toISO8601
+ */
public function testToISO8601($tz, $setTime, $local, $expected)
{
if (is_null($tz))
@@ -730,6 +739,7 @@ public function testToISO8601($tz, $setTime, $local, $expected)
*
* @dataProvider casesToMySQL
* @since 11.3
+ * @covers JDate::toSql
*/
public function testToSql($tz, $setTime, $local, $expected)
{
@@ -759,6 +769,7 @@ public function testToSql($tz, $setTime, $local, $expected)
*
* @dataProvider casesToUnix
* @since 11.3
+ * @covers JDate::toUnix
*/
public function testToUnix($tz, $setTime, $expected)
{
@@ -787,6 +798,7 @@ public function testToUnix($tz, $setTime, $expected)
*
* @dataProvider casesSetTimezone
* @since 11.3
+ * @covers JDate::setTimezone
*/
public function testSetTimezone($tz, $expected)
{

0 comments on commit 78677f9

Please sign in to comment.
Something went wrong with that request. Please try again.