Loading Please wait...

unitTestReader Class Reference
[Unit Testing]

The Class that Reads Unit Test Files used by zigmoyd itself you dont need to use this class manually in your Code. More...

Inheritance diagram for unitTestReader:

Inheritance graph
[legend]
Collaboration diagram for unitTestReader:

Collaboration graph
[legend]

Public Member Functions

 unitTestReader ($sessId)
 Construct the unit Teast Reader Class.
 hasNext ()
 Returns a Boolean vlue wheather or not it has Next Item.
 next ()
 Get The Next item.
 current ()
 Get the Current Item.
 length ()
 Returns teh Length of Test Vector.
 currentIndex ()
 Returns teh Current Index.
 totalPassed ()
 returns the Total ammount of Test(s) Passed

Data Fields

 $testFile
 $__struct
 $current = 0

Detailed Description

The Class that Reads Unit Test Files used by zigmoyd itself you dont need to use this class manually in your Code.

For internal use only.

Definition at line 12 of file testReader.php.


Member Function Documentation

unitTestReader::unitTestReader ( sessId  ) 

Construct the unit Teast Reader Class.

Parameters:
$sessId string
Returns:
unitTestReader

Definition at line 23 of file testReader.php.

References $testFile, and perror().

00023                                   {
00024     $testFile = ZIGROOT.DRS.Z_DIR_PROJECTS.DRS.Z_PROJECT_DIR.DRS.Z_DIR_UNIT_TEST.DRS.$sessId.'.zut';
00025     if(!(is_file($testFile) && is_readable($testFile))){
00026       perror("unitTest.read<br />Unable to Open $testFile for reading purpouse<br />Either the file doesn't exist or is not readable");
00027       exit;
00028     }else{
00029       $this->__struct = parse_ini_file($testFile, true);
00030     }
00031     if(count($this->__struct) <= 0){
00032       perror("unitTest.read<br />No Unit Test(s) has been performed 0 Tests Found");
00033       exit;
00034     }
00035   }

Here is the call graph for this function:

unitTestReader::hasNext (  ) 

Returns a Boolean vlue wheather or not it has Next Item.

Returns:
boolean

Definition at line 41 of file testReader.php.

References current().

00041                     {
00042     return ($this->current < count($this->__struct));
00043   }

Here is the call graph for this function:

unitTestReader::next (  ) 

Get The Next item.

Definition at line 48 of file testReader.php.

References current().

00048                  {
00049     ++$this->current;
00050   }

Here is the call graph for this function:

unitTestReader::current (  ) 

Get the Current Item.

Returns:
assertItem

Definition at line 56 of file testReader.php.

Referenced by currentIndex(), hasNext(), and next().

00056                     {
00057     return $this->__struct[$this->current];
00058   }

unitTestReader::length (  ) 

Returns teh Length of Test Vector.

Returns:
int

Definition at line 64 of file testReader.php.

00064                    {
00065     return count($this->__struct);
00066   }

unitTestReader::currentIndex (  ) 

Returns teh Current Index.

Returns:
int

Definition at line 72 of file testReader.php.

References current().

00072                          {
00073     return $this->current;
00074   }

Here is the call graph for this function:

unitTestReader::totalPassed (  ) 

returns the Total ammount of Test(s) Passed

Returns:
int

Definition at line 80 of file testReader.php.

00080                         {
00081     $pi=0;
00082     foreach($this->__struct as $i => $testObj){
00083       if($testObj['ExpFlag'] == 1){
00084         ++$pi;
00085       }
00086     }
00087     return $pi;
00088   }


Field Documentation

unitTestReader::$testFile

Definition at line 13 of file testReader.php.

Referenced by unitTestReader().

unitTestReader::$__struct

Definition at line 14 of file testReader.php.

unitTestReader::$current = 0

Definition at line 15 of file testReader.php.


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

Generated on Mon Oct 27 23:53:14 2008 for zigmoyd.kdevelop by doxygen 1.5.6