/**
  * Initialize router
  */
 static function setupBeforeClass()
 {
     parent::setupBeforeClass();
     if (testAdapter == 'HTTP') {
         // echo("Test using HTTP adapter\n");
         static::$adapter = new GuzzleAdapter(new Client());
     } else {
         if (null == self::$app) {
             // echo("Test using built-in Router\n");
             self::$app = new Router();
         }
     }
 }
示例#2
0
 /**
  * Build HTTP request and get response
  */
 protected static function getResponse($request, $parameters = array(), $method = 'GET')
 {
     if (!$request instanceof Request) {
         $request = Request::create($request, $method, $parameters);
     }
     return self::executeRequest(self::$request = $request);
 }