/** * @covers jjok\String\String::hyphenate */ public function testStringCanBeHyphenated() { $this->assertSame('', String::hyphenate('')); $this->assertSame('-', String::hyphenate(' ')); $this->assertSame('-', String::hyphenate('-')); $this->assertSame('1234567890', String::hyphenate('1234567890')); $this->assertSame('qwertyuiop', String::hyphenate('qwertyuiop')); $this->assertSame('qwertyuiop', String::hyphenate('QWERTYUIOP')); $this->assertSame('camel-case-string', String::hyphenate('CamelCaseString')); $this->assertSame('some-camel-case-string', String::hyphenate('someCamelCaseString')); $this->assertSame('a-hyphenated-string', String::hyphenate('a-hyphenated-string')); $this->assertSame('an-hyphenated-string', String::hyphenate('an-hyphenated-string')); $this->assertSame('a-string-with-spaces', String::hyphenate('a string with spaces')); }