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

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

List of all members.

Public Member Functions

 doTest ()

Private Member Functions

 _testEmptyString ()

Private Attributes

 $declaredButEmptyVar
 $declaredButNotEmptyVar = "not empty"


Detailed Description

Unit test for all functions in String.php.

Author:
Daniel Lindh <[email protected]>

Definition at line 8 of file utString.php.


Member Function Documentation

utString::_testEmptyString (  )  [private]

Definition at line 15 of file utString.php.

Referenced by doTest().

00016   {
00017     $this->setSectionLabel('emptyString, return true test');
00018 
00019     $emptyString = "";
00020     eval($this->needTrue('emptyString($emptyString)'));
00021 
00022     $nullVar = NULL;
00023     eval($this->needTrue('emptyString($nullVar)'));
00024 
00025     $emptyArray = array();
00026     eval($this->needTrue('emptyString($emptyArray)'));
00027 
00028     eval($this->needTrue('emptyString($this->declaredButEmptyVar)'));
00029 
00030     //
00031     $this->setSectionLabel('emptyString, return false test');
00032     $falseVar = false;
00033     eval($this->needFalse('emptyString($falseVar)'));
00034 
00035     $trueVar = true;
00036     eval($this->needFalse('emptyString($trueVar)'));
00037 
00038     $notEmptyString = "kalle";
00039     eval($this->needFalse('emptyString($notEmptyString)'));
00040 
00041     $notEmptyArray = array(1, 2, 3);
00042     eval($this->needFalse('emptyString($notEmptyArray)'));
00043 
00044     eval($this->needFalse('emptyString($this->declaredButNotEmptyVar)'));
00045   }

utString::doTest (  ) 

Definition at line 10 of file utString.php.

References _testEmptyString().

00011   {
00012     $this->_testEmptyString();
00013   }


Member Data Documentation

utString::$declaredButEmptyVar [private]

Definition at line 47 of file utString.php.

utString::$declaredButNotEmptyVar = "not empty" [private]

Definition at line 48 of file utString.php.


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

Generated on Thu Apr 30 17:52:30 2009 for fareofficelib by  doxygen 1.5.8