Exemplo n.º 1
0
 /**
  * Searches All Regions for orders.
  *
  * Searches all regions for any orders.
  *
  * @param array of region urls to search through.
  * @param OrderHandler $orderHandler
  */
 public function searchAllRegionsForOrders(array $regionHrefs, OrderHandler $orderHandler)
 {
     $orderHandler->createRegionRequestsForPool($regionHrefs);
     $pool = $orderHandler->processMultipleRegions();
     $promise = $pool->promise();
     $promise->wait();
 }
Exemplo n.º 2
0
 public function testCreateRegionRequestsForPoolShouldNotBeEmpty()
 {
     $orderHandler = new OrderHandler($this->fakeClient());
     $orderHandler->createRegionRequestsForPool(['http://google.ca']);
     $this->assertNotEmpty($orderHandler->getCreatedRequests());
 }