@@ -31,16 +31,16 @@ public function getData_Perfect_Perfect()
3131 ];
3232
3333 $ postData = [
34- 'keyId ' => ' id ' ,
34+ 'keyId ' => Contact:: FIELD_ID ,
3535 'keyValues ' => [1 , 2 ],
36- 'fields ' => [3 ]
36+ 'fields ' => [Contact:: FIELD_EMAIL ]
3737 ];
3838
3939 $ this ->apiClient ->expects ($ this ->once ())->method ('post ' )
4040 ->with ($ this ->endPoints ->getData ($ this ->customerId ), $ postData )
4141 ->will ($ this ->apiSuccess ($ contacts ));
4242
43- $ responseData = $ this ->contact ->getList ($ this ->customerId , ' id ' , [1 , 2 ], [3 ]);
43+ $ responseData = $ this ->contact ->getList ($ this ->customerId , Contact:: FIELD_ID , [1 , 2 ], [Contact:: FIELD_EMAIL ]);
4444 $ this ->assertEquals ($ contacts , $ responseData );
4545 }
4646
@@ -52,7 +52,7 @@ public function getData_ContactNotFound_EmptyArrayReturned()
5252 $ this ->apiClient ->expects ($ this ->once ())->method ('post ' )
5353 ->will ($ this ->apiSuccess ([]));
5454
55- $ responseData = $ this ->contact ->getList ($ this ->customerId , ' id ' , [1 , 2 ], [3 ]);
55+ $ responseData = $ this ->contact ->getList ($ this ->customerId , Contact:: FIELD_ID , [], [Contact:: FIELD_EMAIL ]);
5656 $ this ->assertEquals ([], $ responseData );
5757 }
5858
@@ -64,7 +64,7 @@ public function get_ApiFailure_ExceptionThrown()
6464 $ this ->expectApiFailure ('post ' );
6565
6666 try {
67- $ this ->contact ->getList ($ this ->customerId , ' id ' , [1 , 2 ], [3 ]);
67+ $ this ->contact ->getList ($ this ->customerId , Contact:: FIELD_ID , [], [Contact:: FIELD_EMAIL ]);
6868 } catch (RequestFailed $ e ) {
6969 return ;
7070 }
@@ -88,9 +88,9 @@ private function apiSuccess(array $data = [])
8888 private function createContact (string $ email , int $ id )
8989 {
9090 return [
91- ' 3 ' => $ email ,
92- ' id ' => $ id ,
93- ' uid ' => 'testuid '
91+ Contact:: FIELD_EMAIL => $ email ,
92+ Contact:: FIELD_ID => $ id ,
93+ Contact:: FIELD_UID => 'testuid '
9494 ];
9595 }
9696}
0 commit comments