コード例 #1
0
ファイル: bootstrap.php プロジェクト: titon/utility-old
 function normal_case($string)
 {
     return Inflector::normalCase($string);
 }
コード例 #2
0
ファイル: InflectorTest.php プロジェクト: titon/utility-old
 /**
  * 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"!'));
 }