function hyphenate($string) { return Inflector::hyphenate($string); }
/** * Test that hyphenate() returns a dashed form. */ public function testHyphenate() { $this->assertEquals('camel-Case', Inflector::hyphenate('camel Case')); $this->assertEquals('StuDly-CaSe', Inflector::hyphenate('StuDly CaSe')); $this->assertEquals('Title-Case', Inflector::hyphenate('Title Case')); $this->assertEquals('Normal-case', Inflector::hyphenate('Normal case')); $this->assertEquals('lowercase', Inflector::hyphenate('lowercase')); $this->assertEquals('UPPERCASE', Inflector::hyphenate('UPPERCASE')); $this->assertEquals('under_score', Inflector::hyphenate('under_score')); $this->assertEquals('dash-es', Inflector::hyphenate('dash-es')); $this->assertEquals('123-numbers', Inflector::hyphenate('123 numbers')); $this->assertEquals('with-EXT.xml', Inflector::hyphenate('with EXT.xml')); $this->assertEquals('lots-of-white-space', Inflector::hyphenate('lots of white space')); }