Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

CamelCaseToDashFilter & numbers #33

Open
joshhornby opened this issue Jun 29, 2016 · 1 comment
Open

CamelCaseToDashFilter & numbers #33

joshhornby opened this issue Jun 29, 2016 · 1 comment
Labels

Comments

@joshhornby
Copy link

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);
    }
@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-filter; a new issue has been opened at laminas/laminas-filter#10.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants