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

'uses' and 'covers' should only take a single word #1857

Closed
kingcrunch opened this issue Sep 16, 2015 · 3 comments
Closed

'uses' and 'covers' should only take a single word #1857

kingcrunch opened this issue Sep 16, 2015 · 3 comments
Labels
type/enhancement A new idea that should be implemented

Comments

@kingcrunch
Copy link

I'd like to comment, why it's OK for a test to @uses a different class, or method like

/**
 * @uses Foo\Bar This is a value object
 */

This fails with

Trying to @cover or @use not existing class or interface "Foo\Bar This is a value object".

Because it is not possible to refer to a class, or method with a whitespace PHPUnit should only take the first word after the annotation and should leave everything else as a comment

@sebastianbergmann
Copy link
Owner

Makes sense to me. I'll gladly accept a pull request that adapts the respective regular expressions.

@sebastianbergmann sebastianbergmann added the type/enhancement A new idea that should be implemented label Oct 2, 2015
dstockto pushed a commit to dstockto/phpunit that referenced this issue Oct 5, 2015
@kingcrunch
Copy link
Author

@dstockto Thanks :)

@dstockto
Copy link

dstockto commented Oct 5, 2015

@kingcrunch No problem. I hope I didn't break anything :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A new idea that should be implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants