Support DataProvider attribute in unit tests by Naktibalda · Pull Request #6491 · Codeception/Codeception

Implements support for #[\Codeception\Attribute\DataProvider], #[\Codeception\Attribute\Examples] and @example annotation in unit tests.
Drops support for #[\PHPUnit\Attribute\DataProvider], @backupGlobals, @backupStaticAttributes, @preserveGlobalState and @testwith annotations.

I reused new DataProvider class is Cest Loader.

New possibilities:

  • Unit format can use private method as data providers
  • Cest format can use data provider methods from other classes.