File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -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 (){
@@ -220,6 +237,9 @@ public function testPayments()
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 );
Original file line number Diff line number Diff line change @@ -80,6 +80,15 @@ public function testLifecycle()
8080 $ fetchResult = Trolley \Recipient::find ($ createResult ->id );
8181 $ this ->assertEquals ('Bob ' , $ fetchResult ->firstName );
8282
83+ $ searchResult = Trolley \Recipient::search (
84+ [
85+ "name " => $ createResult ->firstName ,
86+ "page " => 1 ,
87+ "pageSize " => 2
88+ ]
89+ );
90+ $ this ->assertEquals ($ searchResult ->firstItem ()->firstName , $ createResult ->firstName );
91+
8392 $ deleteResult = Trolley \Recipient::delete ($ createResult ->id );
8493 $ this ->assertTrue ($ deleteResult );
8594
You can’t perform that action at this time.
0 commit comments