Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

TestCaseProviderSniff does not detect data provider method "class::provider" #163

Open
ziegenberg opened this issue May 20, 2024 · 1 comment

Comments

@ziegenberg
Copy link
Contributor

You can share data providers between separate unit tests with:

    /**
     * Test something.
     *
     * @dataProvider \some\class\test_class::test_provider
     */
    public function test_something(){}

This generates the error message: Data provider method "\some\class\test_class::test_provider" not found.

@stronk7
Copy link
Member

stronk7 commented May 20, 2024

I personally don't like shared data providers. Specially when we don't autoload unit tests and that may break one by one isolated execution by adding inter dependencies between tests.

Surely we can easily skip the error/warning if the FQCN of the class is "remote", but still I'm not completely sold to the idea.

Just saying, my very own opinion. :-)

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

No branches or pull requests

2 participants