PageRenderTime 50ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/lib/models/benefits/HspTest.php

https://bitbucket.org/wildanm/orangehrm
PHP | 317 lines | 185 code | 97 blank | 35 comment | 3 complexity | 07a86497ba3d5cf33102916ec92a7051 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, AGPL-3.0, BSD-3-Clause, AGPL-1.0, GPL-2.0, LGPL-2.1, LGPL-3.0
  1. <?php
  2. // Call HspTest::main() if this source file is executed directly.
  3. if (!defined('PHPUnit_MAIN_METHOD')) {
  4. define('PHPUnit_MAIN_METHOD', 'HspTest::main');
  5. }
  6. require_once 'PHPUnit/Framework.php';
  7. require_once "testConf.php";
  8. require_once ROOT_PATH."/lib/confs/Conf.php";
  9. require_once 'Hsp.php';
  10. /**
  11. * Test class for Hsp.
  12. * Generated by PHPUnit on 2008-02-19 at 11:29:52.
  13. */
  14. class HspTest extends PHPUnit_Framework_TestCase {
  15. private $paymentRequestFields;
  16. private $employeeFields;
  17. /**
  18. * Runs the test methods of this class.
  19. *
  20. * @access public
  21. * @static
  22. */
  23. public static function main() {
  24. require_once 'PHPUnit/TextUI/TestRunner.php';
  25. $suite = new PHPUnit_Framework_TestSuite('HspTest');
  26. $result = PHPUnit_TextUI_TestRunner::run($suite);
  27. }
  28. /**
  29. * Sets up the fixture, for example, opens a network connection.
  30. * This method is called before a test is executed.
  31. *
  32. * @access protected
  33. */
  34. protected function setUp() {
  35. $this->paymentRequestFields = "`id`, `hsp_id`, `employee_id`, `date_incurred`, `provider_name`, `person_incurring_expense`, " .
  36. "`expense_description`, `expense_amount`, `payment_made_to`, `third_party_account_number`, " .
  37. "`mail_address`, `comments`, `date_paid`, `check_number`, `status`";
  38. $this->employeeFields = "`emp_number`, `employee_id`, `emp_lastname`, `emp_firstname`, `emp_middle_name`, `emp_nick_name`, " .
  39. "`emp_smoker`, `ethnic_race_code`, `emp_birthday`, `nation_code`, `emp_gender`, `emp_marital_status`, " .
  40. "`emp_ssn_num`, `emp_sin_num`, `emp_other_id`, `emp_dri_lice_num`, `emp_dri_lice_exp_date`, `emp_military_service`, " .
  41. "`emp_status`, `job_title_code`, `eeo_cat_code`, `work_station`, `emp_street1`, `emp_street2`, " .
  42. "`city_code`, `coun_code`, `provin_code`, `emp_zipcode`, `emp_hm_telephone`, `emp_mobile`, " .
  43. "`emp_work_telephone`, `emp_work_email`, `sal_grd_code`, `joined_date`, `emp_oth_email`";
  44. $conf = new Conf();
  45. $this->connection = mysql_connect($conf->dbhost.":".$conf->dbport, $conf->dbuser, $conf->dbpass);
  46. mysql_select_db($conf->dbname);
  47. }
  48. /**
  49. * Tears down the fixture, for example, closes a network connection.
  50. * This method is called after a test is executed.
  51. *
  52. * @access protected
  53. */
  54. protected function tearDown() {
  55. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"));
  56. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_employee`"));
  57. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '0' WHERE `key` = 'hsp_current_plan'"));
  58. }
  59. public function testUpdateAccrued() {
  60. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_pay_period`"));
  61. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"));
  62. // Here 'check dates' don't mach with pay periods. They have been added to get three past check dates from current day.
  63. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(1, '".date('Y')."-01-01', '".date('Y')."-01-31', '".date('Y')."-01-31', '".date('Y-m-d', time()-3600*24*3)."', '".date('Y')."-01-20')"));
  64. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(2, '".date('Y')."-02-01', '".date('Y')."-02-29', '".date('Y')."-02-29', '".date('Y-m-d', time()-3600*24*2)."', '".date('Y')."-02-20')"));
  65. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(3, '".date('Y')."-03-01', '".date('Y')."-03-31', '".date('Y')."-03-31', '".date('Y-m-d', time()-3600*24*1)."', '".date('Y')."-03-20')"));
  66. // Summary Insert
  67. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 1, 1500, 50, 50, 0, 0)"), mysql_error());
  68. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 2, 1, '".date('Y')."', 1, 2500, 75, 75, 0, 0)"), mysql_error());
  69. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_accrued_last_updated'"));
  70. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '1' WHERE `key` = 'hsp_current_plan'"));
  71. $result = mysql_query("SELECT COUNT(*) FROM `hs_hr_pay_period` WHERE `check_date` < '".date('Y-m-d')."'");
  72. $resultArray = mysql_fetch_array($result);
  73. $expectedAccrued1 = 100*$resultArray[0]; // 100 comes from Summary Insert (50+50)
  74. $expectedAccrued2 = 150*$resultArray[0];
  75. Hsp::updateAccrued(date('Y')); // total_accrued is calculated by function and should be equal to $expectedAccrued
  76. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  77. $resultArray = mysql_fetch_array($result);
  78. $this->assertEquals($resultArray[0], $expectedAccrued1);
  79. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 2");
  80. $resultArray = mysql_fetch_array($result);
  81. $this->assertEquals($resultArray[0], $expectedAccrued2);
  82. }
  83. public function testUpdateAccruedHalted() {
  84. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_pay_period`"));
  85. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"));
  86. // Here 'check dates' don't mach with pay periods. They have been added to get three past check dates from current day.
  87. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(1, '".date('Y')."-01-01', '".date('Y')."-01-31', '".date('Y')."-01-31', '".date('Y-m-d', time()-3600*24*3)."', '".date('Y')."-01-20')"));
  88. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(2, '".date('Y')."-02-01', '".date('Y')."-02-29', '".date('Y')."-02-29', '".date('Y-m-d', time()-3600*24*2)."', '".date('Y')."-02-20')"));
  89. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(3, '".date('Y')."-03-01', '".date('Y')."-03-31', '".date('Y')."-03-31', '".date('Y-m-d', time()-3600*24*1)."', '".date('Y')."-03-20')"));
  90. // Summary Insert
  91. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 0, 1500, 50, 50, 823, 0)"), mysql_error());
  92. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 2, 1, '".date('Y')."', 0, 2500, 75, 75, 0, 0)"), mysql_error());
  93. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_accrued_last_updated'"));
  94. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '1' WHERE `key` = 'hsp_current_plan'"));
  95. $result = mysql_query("SELECT COUNT(*) FROM `hs_hr_pay_period` WHERE `check_date` < '".date('Y-m-d')."'");
  96. $resultArray = mysql_fetch_array($result);
  97. // Since `hsp_plan_status` is 0 no accrued should happen
  98. $expectedAccrued1 = 823;
  99. $expectedAccrued2 = 0;
  100. Hsp::updateAccrued(date('Y')); // total_accrued is calculated by function and should be equal to $expectedAccrued
  101. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  102. $resultArray = mysql_fetch_array($result);
  103. $this->assertEquals($expectedAccrued1, $resultArray[0]);
  104. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 2");
  105. $resultArray = mysql_fetch_array($result);
  106. $this->assertEquals($expectedAccrued2, $resultArray[0]);
  107. }
  108. public function testUpdateAccruedForTwoPlans() {
  109. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_pay_period`"));
  110. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"));
  111. // Here 'check dates' don't mach with pay periods. They have been added to get three past check dates from current day.
  112. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(1, '".date('Y')."-01-01', '".date('Y')."-01-31', '".date('Y')."-01-31', '".date('Y-m-d', time()-3600*24*3)."', '".date('Y')."-01-20')"));
  113. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(2, '".date('Y')."-02-01', '".date('Y')."-02-29', '".date('Y')."-02-29', '".date('Y-m-d', time()-3600*24*2)."', '".date('Y')."-02-20')"));
  114. $this->assertTrue(mysql_query("INSERT INTO hs_hr_pay_period VALUES(3, '".date('Y')."-03-01', '".date('Y')."-03-31', '".date('Y')."-03-31', '".date('Y-m-d', time()-3600*24*1)."', '".date('Y')."-03-20')"));
  115. // Summary Insert
  116. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 1, 1500, 50, 50, 0, 0)"), mysql_error());
  117. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 1, 3, '".date('Y')."', 1, 2500, 75, 75, 0, 0)"), mysql_error());
  118. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_accrued_last_updated'"));
  119. $result = mysql_query("SELECT COUNT(*) FROM `hs_hr_pay_period` WHERE `check_date` < '".date('Y-m-d')."'");
  120. $resultArray = mysql_fetch_array($result);
  121. $expectedAccrued1 = 100*$resultArray[0]; // 100 comes from Summary Insert (50+50)
  122. $expectedAccrued2 = 150*$resultArray[0];
  123. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '4' WHERE `key` = 'hsp_current_plan'"));
  124. Hsp::updateAccrued(date('Y')); // total_accrued is calculated by function and should be equal to $expectedAccrued
  125. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  126. $resultArray = mysql_fetch_array($result);
  127. $this->assertEquals($expectedAccrued1, $resultArray[0]);
  128. $result = mysql_query("SELECT `total_accrued` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 2");
  129. $resultArray = mysql_fetch_array($result);
  130. $this->assertEquals($expectedAccrued2, $resultArray[0]);
  131. }
  132. public function testUpdateUsed() {
  133. $this->assertTrue(mysql_query("TRUNCATE `hs_hr_employee`;", $this->connection), mysql_error());
  134. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_payment_request`"), mysql_error());
  135. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"), mysql_error());
  136. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_employee` ($this->employeeFields) VALUES (1, '001', 'Arnold', 'Subasinghe', '', 'Arnold', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"), mysql_error());
  137. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_employee` ($this->employeeFields) VALUES (2, '002', 'Kalum', 'Kumara', '', 'Kal', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"), mysql_error());
  138. // For employee1
  139. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  140. "VALUES (1, 1, 1, '".date('Y')."-02-01', 'Test provider', 'Tester', 'Just testing', '150', 'TestX', '12345GD', " .
  141. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-02', '123552-55821-ff25', 1)"), mysql_error());
  142. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  143. "VALUES (2, 1, 1, '".date('Y')."-02-10', 'Test provider', 'Tester', 'Just testing', '100', 'TestX', '12345GD', " .
  144. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-11', '123552-55821-ff25', 1)"), mysql_error());
  145. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  146. "VALUES (3, 1, 1, '".date('Y')."-02-20', 'Test provider', 'Tester', 'Just testing', '127', 'TestX', '12345GD', " .
  147. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-21', '123552-55821-ff25', 1)"), mysql_error());
  148. // For employee2
  149. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  150. "VALUES (4, 1, 2, '".date('Y')."-02-01', 'Test provider', 'Tester', 'Just testing', '122', 'TestX', '12345GD', " .
  151. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-02', '123552-55821-ff25', 1)"), mysql_error());
  152. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  153. "VALUES (5, 1, 2, '".date('Y')."-02-10', 'Test provider', 'Tester', 'Just testing', '41', 'TestX', '12345GD', " .
  154. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-11', '123552-55821-ff25', 1)"), mysql_error());
  155. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 1, 1500, 50, 50, 0, 22)"), mysql_error());
  156. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 2, 1, '".date('Y')."', 1, 2500, 75, 75, 0, 0)"), mysql_error());
  157. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_used_last_updated'"));
  158. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '1' WHERE `key` = 'hsp_current_plan'"));
  159. Hsp::updateUsed(date('Y')); // total_used is calculated by function and should be equal to expense sum of employee1 (150+100+127) plus existing value (22)
  160. $result = mysql_query("SELECT `total_used` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  161. $resultArray = mysql_fetch_array($result);
  162. $this->assertEquals(399, $resultArray[0]);
  163. $result = mysql_query("SELECT `total_used` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 2");
  164. $resultArray = mysql_fetch_array($result);
  165. $this->assertEquals(163, $resultArray[0]); // should be 163 (122+41)
  166. }
  167. public function testUpdateUsedForTwoPlans() {
  168. $this->assertTrue(mysql_query("TRUNCATE `hs_hr_employee`;", $this->connection), mysql_error());
  169. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_payment_request`"), mysql_error());
  170. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"), mysql_error());
  171. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_employee` ($this->employeeFields) VALUES (1, '001', 'Arnold', 'Subasinghe', '', 'Arnold', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"), mysql_error());
  172. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_employee` ($this->employeeFields) VALUES (2, '002', 'Kalum', 'Kumara', '', 'Kal', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"), mysql_error());
  173. // For employee1
  174. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  175. "VALUES (1, 1, 1, '".date('Y')."-02-01', 'Test provider', 'Tester', 'Just testing', '150', 'TestX', '12345GD', " .
  176. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-02', '123552-55821-ff25', 1)"), mysql_error());
  177. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  178. "VALUES (2, 3, 1, '".date('Y')."-02-10', 'Test provider', 'Tester', 'Just testing', '100', 'TestX', '12345GD', " .
  179. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-11', '123552-55821-ff25', 1)"), mysql_error());
  180. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  181. "VALUES (3, 1, 1, '".date('Y')."-02-20', 'Test provider', 'Tester', 'Just testing', '150', 'TestX', '12345GD', " .
  182. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-21', '123552-55821-ff25', 1)"), mysql_error());
  183. $this->assertTrue(mysql_query("INSERT INTO `hs_hr_hsp_payment_request` ($this->paymentRequestFields) " .
  184. "VALUES (4, 3, 1, '".date('Y')."-02-20', 'Test provider', 'Tester', 'Just testing', '100', 'TestX', '12345GD', " .
  185. "'1231, Test Grove, Test City', 'Test', '".date('Y')."-02-21', '123552-55821-ff25', 1)"), mysql_error());
  186. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 1, 1500, 50, 50, 0, 22)"), mysql_error());
  187. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 1, 3, '".date('Y')."', 1, 2500, 75, 75, 0, 0)"), mysql_error());
  188. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_Used_last_updated'"));
  189. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '4' WHERE `key` = 'hsp_current_plan'"));
  190. Hsp::updateUsed(date('Y')); // total_used is calculated by function and should be equal to expense sum of employee1 (150+100+127) plus existed value (22)
  191. $result = mysql_query("SELECT `total_used` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  192. $resultArray = mysql_fetch_array($result);
  193. $this->assertEquals(322, $resultArray[0]);
  194. $result = mysql_query("SELECT `total_used` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 2");
  195. $resultArray = mysql_fetch_array($result);
  196. $this->assertEquals(200, $resultArray[0]); // should be 163 (122+41)
  197. }
  198. public function testUpdateStatus() {
  199. $this->assertTrue(mysql_query("TRUNCATE TABLE `hs_hr_hsp_summary`"), mysql_error());
  200. $this->assertNotNull(mysql_query("INSERT INTO `hs_hr_employee` VALUES (1, '001', 'Arnold', 'Subasinghe', '', 'Arnold', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"));
  201. $this->assertNotNull(mysql_query("INSERT INTO `hs_hr_employee` VALUES (2, '002', 'Kalum', 'Kumara', '', 'Kal', 0, NULL, NULL, NULL, NULL, NULL, '', '', '', '', NULL, '', NULL, NULL, NULL, NULL, '', '', '', 'AF', '', '', '', '', '', '', NULL, NULL, '')"));
  202. // For employee1
  203. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(1, 1, 1, '".date('Y')."', 1, 1500, 50, 50, 0, 22)"), mysql_error());
  204. $this->assertTrue(mysql_query("INSERT INTO hs_hr_hsp_summary VALUES(2, 2, 1, '".date('Y')."', 1, 2500, 75, 75, 0, 0)"), mysql_error());
  205. $this->assertTrue(mysql_query("UPDATE `hs_hr_config` SET `value` = '".(date('Y')-1)."-12-31' WHERE `key` = 'hsp_Used_last_updated'"));
  206. Hsp::updateStatus(1, 0);
  207. $result = mysql_query("SELECT `hsp_plan_status` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  208. $resultArray = mysql_fetch_array($result);
  209. $this->assertEquals($resultArray[0], 0); // should be 0 (Halted)
  210. Hsp::updateStatus(1, 1);
  211. $result = mysql_query("SELECT `hsp_plan_status` FROM `hs_hr_hsp_summary` WHERE `summary_id` = 1");
  212. $resultArray = mysql_fetch_array($result);
  213. $this->assertEquals($resultArray[0], 1); // should be 1 (Active)
  214. }
  215. }
  216. // Call HspTest::main() if this source file is executed directly.
  217. if (PHPUnit_MAIN_METHOD == 'HspTest::main') {
  218. HspTest::main();
  219. }
  220. ?>