public function testProcessMultipleRequestsShouldNotBeEmpty() { $orderHandler = new OrderHandler($this->fakeClient()); $pool = $orderHandler->processMultipleRequests([new Request('GET', 'http://google.ca')]); $promise = $pool->promise(); $promise->wait(); $this->assertNotEmpty($orderHandler->getAcceptedResponsesJson()); }
/** * Gets all the details about the market for a specific item * * Based on `searchAllRegionsForOrders`, we then use the `createRequestsForMarketDetailsPool` to createdRequests * responses that then get used with this function to give you all the regions selling that item and there associated * details. * * @param OrderHandler $orderHandler * @param array of GuzzleHttp\Psr7\Request * @return array of decoded json */ public function getOrderResponsesFromRegionSearch(OrderHandler $orderHandler, array $createdRequests) { $pool = $orderHandler->processMultipleRequests($createdRequests); $promise = $pool->promise(); $promise->wait(); return $orderHandler->getAcceptedResponsesJson(); }