The docs for @dataProvider says that the providing function can return either and array of array or a object that implements the Iterator interface. However, this appears to be completely undocumented. It would be nice to have an example of this using either a CSV file or database connection.
Added in sebastianbergmann/phpunit-documentation@ce8b14d
In the future, please open documentation issues under the phpunit-documentation project. Thanks!