UTDate Class Reference
[Unit Tests - Unit tests for all classes/functions in fareofficelib.]

Unit test for all functions in Date.php. More...

List of all members.

Public Member Functions

 doTest ()

Private Member Functions

 _testIsValidDate ()
 _testIsValidTime ()


Detailed Description

Unit test for all functions in Date.php.

Author:
Daniel Lindh <[email protected]>

Definition at line 8 of file UTDate.class.php.


Member Function Documentation

UTDate::_testIsValidDate (  )  [private]

Definition at line 16 of file UTDate.class.php.

Referenced by doTest().

00017   {
00018     $this->setSectionLabel('isValidDate');
00019     eval($this->needTrue('isValidDate("2006-01-01")'));
00020     eval($this->needTrue('isValidDate("2006-01-01 21:02:02")'));
00021     eval($this->needTrue('isValidDate("now")'));
00022     eval($this->needTrue('isValidDate("12jan2009")'));
00023     eval($this->needFalse('isValidDate("2009jan12")'));
00024     eval($this->needFalse('isValidDate("asdfasf")'));
00025     eval($this->needFalse('isValidDate("")'));
00026   }

UTDate::_testIsValidTime (  )  [private]

Definition at line 28 of file UTDate.class.php.

Referenced by doTest().

00029   {
00030     $this->setSectionLabel('isValidTime');
00031     eval($this->needTrue('isValidTime("21:02:02")'));
00032     eval($this->needFalse('isValidTime("21:00")'));
00033     eval($this->needFalse('isValidTime("25:02:02")'));
00034     eval($this->needFalse('isValidTime("21:62:02")'));
00035     eval($this->needFalse('isValidTime("21:02:62")'));
00036     eval($this->needFalse('isValidTime("2009jan12")'));
00037     eval($this->needFalse('isValidTime("asdfasf")'));
00038     eval($this->needFalse('isValidTime("")'));
00039   }

UTDate::doTest (  ) 

Definition at line 10 of file UTDate.class.php.

References _testIsValidDate(), and _testIsValidTime().

00011   {
00012     $this->_testIsValidDate();
00013     $this->_testIsValidTime();
00014   }


The documentation for this class was generated from the following file:

Generated on Wed May 6 23:28:24 2009 for fareofficelib by  doxygen 1.5.8