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 |
For internal use only.
Definition at line 12 of file testReader.php.
unitTestReader::unitTestReader | ( | $ | sessId | ) |
Construct the unit Teast Reader Class.
$sessId | string |
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 }
unitTestReader::hasNext | ( | ) |
Returns a Boolean vlue wheather or not it has Next Item.
Definition at line 41 of file testReader.php.
References current().
00041 { 00042 return ($this->current < count($this->__struct)); 00043 }
unitTestReader::next | ( | ) |
Get The Next item.
Definition at line 48 of file testReader.php.
References current().
00048 { 00049 ++$this->current; 00050 }
unitTestReader::current | ( | ) |
Get the Current Item.
Definition at line 56 of file testReader.php.
Referenced by currentIndex(), hasNext(), and next().
00056 { 00057 return $this->__struct[$this->current]; 00058 }
unitTestReader::length | ( | ) |
unitTestReader::currentIndex | ( | ) |
Returns teh Current Index.
Definition at line 72 of file testReader.php.
References current().
00072 { 00073 return $this->current; 00074 }
unitTestReader::totalPassed | ( | ) |
returns the Total ammount of Test(s) Passed
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 }
unitTestReader::$testFile |
unitTestReader::$__struct |
Definition at line 14 of file testReader.php.
unitTestReader::$current = 0 |
Definition at line 15 of file testReader.php.