1414
1515require_once './autoload.php ' ;
1616
17- use Model \GCashModel as gcash ;
17+ use Model \GCashModel as GCash ;
1818/**
1919 * First Global Data
2020 *
2828
2929class GCashModelTest extends \PHPUnit_Framework_TestCase
3030{
31+ /**
32+ * [$_model description]
33+ *
34+ * @var [type]
35+ *
36+ */
3137 private $ _model ;
3238
3339 /**
@@ -41,7 +47,7 @@ public function testGetRemittanceWithPaidRefNo()
4147
4248 $ postParam = array ('refNo ' => '502000098 ' ,);
4349
44- $ this ->_model = new gcash ($ postParam );
50+ $ this ->_model = new GCash ($ postParam );
4551 $ expected ='502000098|1|200.00|Bhjkgfj|Teest||null|null|null|Ertertwe| ' ;
4652
4753 $ this ->_model ->showRemittanceDetail ();
@@ -59,7 +65,7 @@ public function testGetRemittanceWithApprovedRefNo()
5965 {
6066 $ postParam = array ('refNo ' => '502000008 ' );
6167
62- $ this ->_model = new gcash ($ postParam );
68+ $ this ->_model = new GCash ($ postParam );
6369 $ expected ='502000008|0|20.00|Ali|Nadia||null|null|null|687 Main| ' ;
6470
6571 $ this ->_model ->showRemittanceDetail ();
@@ -77,7 +83,7 @@ public function testGetRemittanceWithOtherRefNo()
7783 {
7884 $ postParam = array ('refNo ' => '502000039 ' ,);
7985
80- $ this ->_model = new gcash ($ postParam );
86+ $ this ->_model = new GCash ($ postParam );
8187 $ expected = '3 ' ;
8288
8389 $ this ->_model ->showRemittanceDetail ();
@@ -96,7 +102,7 @@ public function testTagAsCompleteWithPaidRefNo()
96102
97103 $ postParam = array ('refNo ' => '502000098 ' ,);
98104
99- $ this ->_model = new gcash ($ postParam );
105+ $ this ->_model = new GCash ($ postParam );
100106 $ expected ='2 ' ;
101107
102108 $ this ->_model ->tagAsCompleted ();
@@ -115,7 +121,7 @@ public function ptestTagAsCompleteWithApprovedRefNo()
115121 {
116122 $ postParam = array ('refNo ' => '502000011 ' ,'traceNo ' =>'T77 ' );
117123
118- $ this ->_model = new gcash ($ postParam );
124+ $ this ->_model = new GCash ($ postParam );
119125 $ expected ='' ;
120126
121127 $ this ->_model ->tagAsCompleted ();
@@ -133,7 +139,7 @@ public function testTagAsCompleteWithOtherRefNo()
133139 {
134140 $ postParam = array ('refNo ' => '502000039 ' ,'traceNo ' =>'T77 ' );
135141
136- $ this ->_model = new gcash ($ postParam );
142+ $ this ->_model = new GCash ($ postParam );
137143 $ expected = '3 ' ;
138144
139145 $ this ->_model ->tagAsCompleted ();
@@ -153,7 +159,7 @@ public function testInquireTagAsCompletedWithPaidRefNo()
153159
154160 $ postParam = array ('refNo ' => '502000098 ' ,'traceNo ' =>'T77 ' );
155161
156- $ this ->_model = new gcash ($ postParam );
162+ $ this ->_model = new GCash ($ postParam );
157163 $ expected ='T77|502000098|0|200.00|Bhjkgfj|Teest||null|null|null|Ertertwe| ' ;
158164
159165 $ this ->_model ->inquireTagAsCompleted ();
@@ -172,7 +178,7 @@ public function testInquireTagAsCompletedWithApprovedRefNo()
172178 {
173179 $ postParam = array ('refNo ' => '502000011 ' ,'traceNo ' =>'T77 ' );
174180
175- $ this ->_model = new gcash ($ postParam );
181+ $ this ->_model = new GCash ($ postParam );
176182 $ expected ='1 ' ;
177183
178184 $ this ->_model ->inquireTagAsCompleted ();
@@ -190,7 +196,7 @@ public function testTransactionExistsWithCorrectRefNo()
190196 {
191197 $ postParam = array ('refNo ' => '' );
192198
193- $ this ->model = new gcash ($ postParam );
199+ $ this ->model = new GCash ($ postParam );
194200
195201 $ expected =true ;
196202 $ result = $ this ->model ->checkRefNoTransactionExists ('502000098 ' );
@@ -206,16 +212,26 @@ public function testTransactionExistsWithoutCorrectRefNo()
206212 {
207213 $ postParam = array ('refNo ' => '' );
208214
209- $ this ->model = new gcash ($ postParam );
215+ $ this ->model = new GCash ($ postParam );
210216
211217 $ expected =false ;
212218 $ result = $ this ->model ->checkRefNoTransactionExists ('manisfasfh ' );
213219 $ this ->assertEquals ($ expected , $ result );
214220 }
215221
216-
217-
218-
222+ /**
223+ * [testChangePassword description]
224+ *
225+ * @return [type] [description]
226+ */
227+ public function testChangePassword ()
228+ {
229+ $ postParam = array ('refNo ' => '' ,'username ' =>'AWARFA ' ,'newPassword ' =>'123456 ' );
230+ $ this ->_model = new GCash ($ postParam );
231+ $ this ->_model ->changePassword ();
232+ $ result = $ this ->_model ->getReturn ();
233+ $ this ->assertEquals ('0 ' , $ result );
234+ }
219235}
220236
221237?>
0 commit comments