Exemplo n.º 1
0
 function normal_case($string)
 {
     return Inflector::normalCase($string);
 }
Exemplo n.º 2
0
 /**
  * Test that normalCase() returns strings as normal case sentences.
  */
 public function testNormalCase()
 {
     $this->assertEquals('This is a string with studly case', Inflector::normalCase('This is A sTring wIth sTudly cAse'));
     $this->assertEquals('And this one has underscores', Inflector::normalCase('and_this_ONE_has_underscores'));
     $this->assertEquals('While this one contains -- dashes', Inflector::normalCase('WHILE this one contains -- DASHES'));
     $this->assertEquals('This is a mix of underscores -- and dashes', Inflector::normalCase('This_is A_MIX oF undeRscores -- aNd_dashes'));
     $this->assertEquals('Lastly, this string contains "punctuation"!', Inflector::normalCase('LaStlY, this STRING contains "punctuation"!'));
 }