How can I reference external data providers in phpunit?
问题 I am trying to run some tests using a common data provider in PHPUnit. See below test: namespace AppBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use AppBundle\Tests\DataProvider\XmlDataProvider; class DefaultControllerTest extends WebTestCase { /** * @dataProvider XmlDataProvider::xmlProvider * @covers ReceiveController::receiveAction() * @param string */ public function testReceive($xml) { $client = static::createClient([], ['HTTP_HOST' => 'mt.host']);