@@ -200,23 +200,32 @@ public function testAsyncTnLookup() {
200200 $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \CreateAsyncBulkResponse::class, $ createResponse ->getResult ());
201201 $ this ->assertIsArray ($ createResponse ->getResult ()->links );
202202 $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \CreateAsyncBulkResponseData::class, $ createResponse ->getResult ()->data );
203- $ this ->assertTrue ( strlen ( $ createResponse ->getResult ()->data ->requestId ) > 0 );
204- $ this ->assertTrue ( strlen ( $ createResponse ->getResult ()->data ->status ) > 0 );
203+ $ this ->assertIsString ( $ createResponse ->getResult ()->data ->requestId );
204+ $ this ->assertIsString ( $ createResponse ->getResult ()->data ->status );
205205 $ this ->assertIsArray ($ createResponse ->getResult ()->errors );
206-
206+
207207 // $requestId = $createResponse->getResult()->requestId;
208208 // $getResponse = $this->bandwidthClient->getPhoneNumberLookup()->getClient()->getLookupRequestStatus(getenv("BW_ACCOUNT_ID"), $requestId);
209209 // $this->assertTrue(strlen($getResponse->getResult()->status) > 0);
210210 }
211-
211+
212212 public function testSyncTnLookup () {
213213 $ body = new BandwidthLib \PhoneNumberLookup \Models \CreateLookupRequest ();
214214 $ body ->phoneNumbers = [getenv ("USER_NUMBER " )];
215215 $ response = $ this ->bandwidthClient ->getPhoneNumberLookup ()->getClient ()->createSyncLookupRequest (getenv ("BW_ACCOUNT_ID " ), $ body );
216216 $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \LookupResponse::class, $ response ->getResult ());
217217 $ this ->assertIsArray ($ response ->getResult ()->links );
218+ $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \Link::class, $ response ->getResult ()->links [0 ]);
218219 $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \LookupResponseData::class, $ response ->getResult ()->data );
219- $ this ->assertTrue (strlen ($ response ->getResult ()->data ->status ) > 0 );
220+ $ this ->assertIsString ($ createResponse ->getResult ()->data ->requestId );
221+ $ this ->assertIsString ($ createResponse ->getResult ()->data ->status );
222+ $ this ->assertIsArray ($ response ->getResult ()->data ->results );
223+ $ this ->assertInstanceOf (BandwidthLib \PhoneNumberLookup \Models \LookupResult::class, $ response ->getResult ()->data ->results [0 ]);
224+ $ this ->assertIsString ($ response ->getResult ()->data ->results [0 ]->phoneNumber );
225+ $ this ->assertIsString ($ response ->getResult ()->data ->results [0 ]->lineType );
226+ $ this ->assertIsString ($ response ->getResult ()->data ->results [0 ]->messagingProvider );
227+ $ this ->assertIsString ($ response ->getResult ()->data ->results [0 ]->voiceProvider );
228+ $ this ->assertIsString ($ response ->getResult ()->data ->results [0 ]->countryCodeA3 );
220229 $ this ->assertIsArray ($ response ->getResult ()->errors );
221230 }
222231}
0 commit comments