Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--testdox option doesn't format snake_case tests #2039

Closed
adamwathan opened this issue Jan 17, 2016 · 1 comment
Closed

--testdox option doesn't format snake_case tests #2039

adamwathan opened this issue Jan 17, 2016 · 1 comment
Labels
type/bug Something is broken

Comments

@adamwathan
Copy link

Perhaps this is by design, but I've noticed that if I run PHPUnit with the --testdox flag when using snake_case test names, the test_ isn't stripped and the first letter of the test name isn't capitalized.

For example,

public function testMyMethodWorks() { ... }

...spits out:

[x] My method works

...but using snake case:

public function test_my_method_works() { ... }

...spits out:

[x] test my method works

Even using the @test annotation like so:

/** @test */
public function my_method_works() { ... }

...doesn't capitalize the first letter:

[x] my method works

Is this by design, and if so is there anywhere I can learn more about why it works this way? If not, it would be really cool to be able to use snake_case test names for the readability benefits, while still getting the nicely formatted testdox output that's achievable with camelCase test names.

Thanks!

@sebastianbergmann sebastianbergmann added the type/bug Something is broken label Feb 22, 2016
sebastianbergmann pushed a commit that referenced this issue Feb 23, 2016
@jtsternberg
Copy link

I think the Docs could be updated to reflect the fact that snake_case works. Thank you for adding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants