Example #1
0
 /**
  * Tests the compareRequestUri method.
  */
 public function testTest()
 {
     foreach ($this->compareRequestUriDataProvider() as $params) {
         list($requestUri, $controllerName, $methodName, $queryString, $headersExpected) = $params;
         $headerWrapper = new HeaderWrapper();
         $headerWrapper->setEnabled(false);
         $this->application->setHeaderWrapper($headerWrapper);
         $this->application->setDefaultController('default');
         $this->application->compareRequestUri($requestUri, array('controller' => $controllerName, 'method' => $methodName, 'query_string' => $queryString));
         $this->assertEquals(!empty($headersExpected), $headerWrapper->getSent(), 'Unexpected result for: ' . $requestUri . ' (Location: ' . $headerWrapper->getHeader('Location') . ')');
     }
 }