@@ -43,7 +43,7 @@ private function deleteRecipient($recipientId) {
4343 $ this ->assertTrue ($ response );
4444 }
4545
46- /* public function testErrors(){
46+ public function testErrors (){
4747
4848 //create inactive Recipient to send payment to
4949 $ recipient = $ this ->createRecipient ();
@@ -78,6 +78,23 @@ public function testAll_smokeTest()
7878 {
7979 $ all = Trolley \Batch::all ();
8080 $ this ->assertTrue ($ all ->maximumCount () > 0 );
81+
82+ $ batch = Trolley \Batch::create ([
83+ "sourceCurrency " => "USD " ,
84+ "description " => "Integration Test Create : PHP SDK " ,
85+ "tags " => ["PHPSDK " ]
86+ ]);
87+
88+ $ searchResult = Trolley \Batch::search ([
89+ "search " => "PHPSDK " ,
90+ "page " => 1 ,
91+ "pageSize " => 5
92+ ]);
93+
94+ $ this ->assertEquals ($ searchResult ->firstItem ()->id , $ batch ->id );
95+
96+ $ response = Trolley \Batch::delete ($ batch ->id );
97+ $ this ->assertTrue ($ response );
8198 }
8299
83100 public function testBalances (){
@@ -151,7 +168,7 @@ public function testUpdate() {
151168 $ response = Trolley \Batch::delete ($ batch ->id );
152169
153170 $ this ->assertTrue ($ response );
154- } */
171+ }
155172
156173 public function testCreateWithPayments ()
157174 {
@@ -194,7 +211,7 @@ public function testCreateWithPayments()
194211 $ this ->deleteRecipient ($ recipientBeta ->id );
195212 }
196213
197- /* public function testPayments()
214+ public function testPayments ()
198215 {
199216 $ batch = Trolley \Batch::create ([
200217 "sourceCurrency " => "USD " ,
@@ -220,6 +237,9 @@ public function testCreateWithPayments()
220237
221238 $ this ->assertTrue ($ response );
222239
240+ $ response = Trolley \Batch::findPayment ($ batch ->id , $ payment ->id );
241+ $ this ->assertEquals ($ response ->id , $ payment ->id );
242+
223243 $ response = Trolley \Batch::deletePayment ($ batch ->id , $ payment ->id );
224244
225245 $ this ->assertTrue ($ response );
@@ -273,5 +293,5 @@ public function testProcessing()
273293
274294 $ this ->deleteRecipient ($ recipientAlpha ->id );
275295 $ this ->deleteRecipient ($ recipientBeta ->id );
276- } */
296+ }
277297}
0 commit comments