Example #1
0
 /**
  * Test getFunctionName with multiple urls given in PATH_INFO
  * 
  * @dataProvider getSamplePathInfoStrings
  */
 public function testGetFunctionName_MultipleUrlsInPathInfo_ReturnString($sPathInfo, $aCorrectValues)
 {
     $_SERVER['PATH_INFO'] = $sPathInfo;
     $oRouter = new Router(array('Default_controller' => 'Ctrl', 'Default_function' => 'indexAction'));
     error_log(__FILE__ . ' (' . __LINE__ . "): \n" . print_r($oRouter->getFunctionName(), 1));
     error_log(__FILE__ . ' (' . __LINE__ . "): \n" . print_r($aCorrectValues['function'], 1));
     $this->assertTrue($oRouter->getFunctionName() === $aCorrectValues['function']);
     unset($oRouter);
     unset($_SERVER['PATH_INFO']);
 }