Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

"Only test methods and data providers can be public" message for a dataprovider #36

Open
fredemmott opened this issue Jul 20, 2018 · 2 comments

Comments

@fredemmott
Copy link
Contributor

Fatal error: Uncaught exception 'Facebook\HackTest\InvalidTestMethodException' with message 'Only test methods and data providers can be public. Consider changing getCleanExamples to a private or protected method.' in /Users/fredemmott/code/hhast/vendor/hhvm/hacktest/src/Framework/HackTestCase.php:122
Stack trace:
#0 /Users/fredemmott/code/hhast/vendor/hhvm/hacktest/src/Framework/HackTestCase.php(25): Facebook\HackTest\HackTestCase->getTestMethods()

Either the restriction should be loosened, or the message should include something along the lines of 'or rename the method to start with provide if it is a data provider'

@fredemmott
Copy link
Contributor Author

fredemmott commented Jul 20, 2018

Perhaps 'get' should also be allowed as a prefix - or included in a migration for anything referenced in @dataprovider (including in subclasses)

@fredemmott
Copy link
Contributor Author

Also would be nice to include the class name in the message

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

No branches or pull requests

1 participant