/**
  * Test the getter/setter for the handler path.
  *
  * @return void
  */
 public function testSetGetHandlerPath()
 {
     $this->webSocketRequest->setHandlerPath(WebSocketRequestTest::HANDLER_PATH);
     $this->assertSame(WebSocketRequestTest::HANDLER_PATH, $this->webSocketRequest->getHandlerPath());
 }
 /**
  * Locates the web socket handler for the passed request.
  *
  * @param \Guzzle\Http\Message\RequestInterface $guzzleRequest The request to find and return the application instance for
  *
  * @return \Ratchet\MessageComponentInterface The handler instance
  */
 public function locateHandler(RequestInterface $guzzleRequest)
 {
     // initialize a new web socket request
     $request = new WebSocketRequest();
     $request->injectRequest($guzzleRequest);
     // load the application
     $application = $this->findApplication($request);
     // register the applications class loader
     $application->registerClassLoaders();
     // load the handler
     $handler = $application->getManager(HandlerContextInterface::IDENTIFIER)->locate($request);
     $handler->injectRequest($request);
     // return the initialized handler instance
     return $handler;
 }