Ejemplo n.º 1
0
 protected function real2path($real, $prefix)
 {
     $arrParts = array();
     foreach (explode($this->speciesDelimiter, $real) as $word) {
         $arrParts[] = $this->helper->underscore2camel($word);
     }
     return implode($this->realDelimiter, $arrParts) . $prefix;
 }
Ejemplo n.º 2
0
 /**
  * @covers SFM_Naming_Helper::camel2underscore
  */
 public function testUnderscore()
 {
     $this->assertEquals('hello', $this->helper->camel2underscore('Hello'));
     $this->assertEquals('hello_world', $this->helper->camel2underscore('HelloWorld'));
     $this->assertEquals('hello_world', $this->helper->camel2underscore('Hello_World'));
     $this->assertEquals('hello_new_world', $this->helper->camel2underscore('Hello_NewWorld'));
     $this->assertEquals('nba', $this->helper->camel2underscore('NBA'));
 }