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
166166 private function buildTestInfo (string $ test , ?string $ host = null , ?string $ thread = null ): TestInfo
167167 {
168168 $ dataLabelMatchResult = preg_match (
169- '#^([^\s]+)\s+with\s+data\s+set\s+"(.*)" \s+\(.+\)$# ' ,
169+ '#^([^\s]+)\s+with\s+data\s+set\s+(\#\d+|".+") \s+\(.+\)$# ' ,
170170 $ test ,
171171 $ matches ,
172172 );
Original file line number Diff line number Diff line change @@ -57,6 +57,32 @@ public function providerData(): iterable
5757 ];
5858 }
5959
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+
6086 private function getRunIndex (string $ method ): int
6187 {
6288 self ::$ runCounters [$ method ] ??= 0 ;
You can’t perform that action at this time.
0 commit comments