I\'ve read the documentation on the topic, and my code follows all requirements of a data provider implementation. First of all, here\'s the full code of the test just in case i
Hello to anyone still getting here from google :) I'm using PHP 7.0.5 and PHPUnit 5.3.2.
As @hubro mentions - don't use __construct()
as it breaks some PHPUnit annotations. Here is a SO tread with more details.
My test's class, MyStuffTest
, extends MyFancyTestcase
which extends PHPUnit_Framework_TestCase
. MyFancyTestcase
used __construct()
and I got the same error. It should use setupBeforeClass()
instead to setup static data shared among all test cases - db connection and such, no need for __construct()
. DataProvider works now.