

Public Member Functions | |
| valid ($expVal, $errMsg=null, $file=null, $line=null) | |
| Result of the Test will be stored in a hard file. | |
| strict ($expVal, $errMsg=null, $file=null, $line=null) | |
| Result of the Test will be stored in a hard file But If the test fails your app will terminate and xyz(Unit test ID) Failed Error Message will be Fired on the Page. | |
Private Member Functions | |
| processTest ($assertItem, $isStrict) | |
| Process Test(s) Called by the other methods of the Class. | |
you will use like.
assert::valid(($x==2), "X is not 2")
assert::valid(($x==2), "X is not 2", __FILE__, __LINE__)
Definition at line 108 of file unit.php.
| assert::valid | ( | $ | expVal, | |
| $ | errMsg = null, |
|||
| $ | file = null, |
|||
| $ | line = null | |||
| ) |
Result of the Test will be stored in a hard file.
| $expVal | boolean | |
| $errMsg | string Optional | |
| $file | string Optional | |
| $line | int Optional |
Definition at line 117 of file unit.php.
References assertItem(), and processTest().
Referenced by u().
00117 { 00118 return assert::processTest(assertItem($expVal, $errMsg, $file, $line), false); 00119 }

| assert::strict | ( | $ | expVal, | |
| $ | errMsg = null, |
|||
| $ | file = null, |
|||
| $ | line = null | |||
| ) |
Result of the Test will be stored in a hard file But If the test fails your app will terminate and xyz(Unit test ID) Failed Error Message will be Fired on the Page.
| $expVal | boolean | |
| $errMsg | string Optional | |
| $file | string Optional | |
| $line | int Optional |
Definition at line 128 of file unit.php.
References assertItem(), and processTest().
00128 { 00129 return assert::processTest(assertItem($expVal, $errMsg, $file, $line), true); 00130 }

| assert::processTest | ( | $ | assertItem, | |
| $ | isStrict | |||
| ) | [private] |
Process Test(s) Called by the other methods of the Class.
| $assertItem | assertItem | |
| $isLive | boolean | |
| $isStrict | boolean |
Definition at line 139 of file unit.php.
References $GLOBALS, and perror().
Referenced by strict(), and valid().
00139 { 00140 if($isStrict){ 00141 if($assertItem->expFlag == 0){ 00142 perror("<code>zigmoyd.unitTest.strict</code><br />Strict Unit Testing Failed.Further Processing Terminated.Check Unit Test Result for more details"); 00143 $GLOBALS['__uTList']->append($assertItem); 00144 exit; 00145 } 00146 } 00147 $GLOBALS['__uTList']->append($assertItem); 00148 }

1.5.6