This repository was archived by the owner on Jan 30, 2020. It is now read-only.
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
CamelCaseToDashFilter & numbers #33
Open
Description
Not sure if this is expected behavior but seems like a bug to me, but if you pass a string with numbers into CamelCaseToDashFilter
the dash is not applied before a number, please see below for a failing unit test.
public function testFilterSeparatesCamelCasedWordsContainingNumbersWithDashes()
{
$string = 'ItIs2016';
$filter = new CamelCaseToDashFilter();
$filtered = $filter($string);
$this->assertNotEquals($string, $filtered);
$this->assertEquals('It-Is-2016', $filtered);
}