File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ private function getCurrentTest(): TestInfo
166
166
private function buildTestInfo (string $ test , ?string $ host = null , ?string $ thread = null ): TestInfo
167
167
{
168
168
$ dataLabelMatchResult = preg_match (
169
- '#^([^\s]+)\s+with\s+data\s+set\s+"(.*)" \s+\(.+\)$# ' ,
169
+ '#^([^\s]+)\s+with\s+data\s+set\s+(\#\d+|".+") \s+\(.+\)$# ' ,
170
170
$ test ,
171
171
$ matches ,
172
172
);
Original file line number Diff line number Diff line change @@ -57,6 +57,32 @@ public function providerData(): iterable
57
57
];
58
58
}
59
59
60
+ /**
61
+ * @dataProvider providerIndexedData
62
+ */
63
+ #[
64
+ DisplayName('Reruns of test with indexed data provider are reported correctly ' ),
65
+ Description("Parameter `retry` has different value on each run but is excluded and doesn't have effect " ),
66
+ ]
67
+ public function testRerunsOfTestWithIndexedDataProvider (string $ firstValue , string $ secondValue ): void
68
+ {
69
+ Allure::parameter ('First argument ' , $ firstValue );
70
+ Allure::parameter ('Second argument ' , $ secondValue );
71
+ Allure::parameter ('Run index ' , (string ) $ this ->getRunIndex (__METHOD__ ), true );
72
+ $ this ->expectNotToPerformAssertions ();
73
+ }
74
+
75
+ /**
76
+ * @return iterable<array{string, string}>
77
+ */
78
+ public function providerIndexedData (): iterable
79
+ {
80
+ return [
81
+ ['a ' , 'b ' ],
82
+ ['b ' , 'b ' ],
83
+ ];
84
+ }
85
+
60
86
private function getRunIndex (string $ method ): int
61
87
{
62
88
self ::$ runCounters [$ method ] ??= 0 ;
You can’t perform that action at this time.
0 commit comments