如何在phpunit中从数据提供程序运行一个特定数据

如何在phpunit中从数据提供程序运行一个特定数据,phpunit,Phpunit,如果我只想使用数据提供程序中的一个数据运行测试,我将如何执行 我在这个线程上尝试了解决方案,但没有成功 我发现只需添加#n就可以为数字索引数据提供程序工作 phpunit --filter ClassName::testName#datasetNumber phpunit --filter ClassName::testName@datasetName 为关联索引的命名数据提供程序添加@name phpunit --filter ClassName::testName#datasetNumb

如果我只想使用数据提供程序中的一个数据运行测试,我将如何执行

我在这个线程上尝试了解决方案,但没有成功

我发现只需添加
#n
就可以为数字索引数据提供程序工作

phpunit --filter ClassName::testName#datasetNumber
phpunit --filter ClassName::testName@datasetName
为关联索引的命名数据提供程序添加
@name

phpunit --filter ClassName::testName#datasetNumber
phpunit --filter ClassName::testName@datasetName
也可以使用正则表达式。有关更多示例,请参见