示例#1
0
 /**
  * Added str_replace('\\', '\\\\', ..) to all processedParts values to disable backreferences
  *
  * @issue ZF-2538 Zend_Filter_Inflector::filter() fails with all numeric folder on Windows
  */
 public function testCheckInflectorWithPregBackreferenceLikeParts()
 {
     $inflector = new InflectorFilter(':moduleDir' . DIRECTORY_SEPARATOR . ':controller' . DIRECTORY_SEPARATOR . ':action.:suffix', array(':controller' => array('Word\\CamelCaseToDash', 'StringToLower'), ':action' => array('Word\\CamelCaseToDash'), 'suffix' => 'phtml'), true, ':');
     $inflector->setStaticRule('moduleDir', 'C:\\htdocs\\public\\cache\\00\\01\\42\\app\\modules');
     $filtered = $inflector(array('controller' => 'FooBar', 'action' => 'MooToo'));
     $this->assertEquals($filtered, 'C:\\htdocs\\public\\cache\\00\\01\\42\\app\\modules' . DIRECTORY_SEPARATOR . 'foo-bar' . DIRECTORY_SEPARATOR . 'Moo-Too.phtml');
 }