@@ -105,7 +105,11 @@ public function providedData(string $className, string $methodName): ?array
105
105
*/
106
106
private function dataProvidedByMethods (ReflectionMethod $ testMethod , MetadataCollection $ dataProvider ): array
107
107
{
108
- $ testMethod = new Event \Code \ClassMethod ($ testMethod ->getDeclaringClass ()->getName (), $ testMethod ->getName ());
108
+ $ testMethodValueObject = new Event \Code \ClassMethod (
109
+ $ testMethod ->getDeclaringClass ()->getName (),
110
+ $ testMethod ->getName (),
111
+ );
112
+
109
113
$ methodsCalled = [];
110
114
$ result = [];
111
115
@@ -116,7 +120,7 @@ private function dataProvidedByMethods(ReflectionMethod $testMethod, MetadataCol
116
120
$ dataProviderMethod = new Event \Code \ClassMethod ($ _dataProvider ->className (), $ _dataProvider ->methodName ());
117
121
118
122
Event \Facade::emitter ()->dataProviderMethodCalled (
119
- $ testMethod ,
123
+ $ testMethodValueObject ,
120
124
$ dataProviderMethod ,
121
125
);
122
126
@@ -162,7 +166,7 @@ private function dataProvidedByMethods(ReflectionMethod $testMethod, MetadataCol
162
166
$ data = $ className ::$ methodName ();
163
167
} catch (Throwable $ e ) {
164
168
Event \Facade::emitter ()->dataProviderMethodFinished (
165
- $ testMethod ,
169
+ $ testMethodValueObject ,
166
170
...$ methodsCalled ,
167
171
);
168
172
@@ -187,7 +191,7 @@ private function dataProvidedByMethods(ReflectionMethod $testMethod, MetadataCol
187
191
188
192
if (array_key_exists ($ key , $ result )) {
189
193
Event \Facade::emitter ()->dataProviderMethodFinished (
190
- $ testMethod ,
194
+ $ testMethodValueObject ,
191
195
...$ methodsCalled ,
192
196
);
193
197
@@ -205,7 +209,7 @@ private function dataProvidedByMethods(ReflectionMethod $testMethod, MetadataCol
205
209
}
206
210
207
211
Event \Facade::emitter ()->dataProviderMethodFinished (
208
- $ testMethod ,
212
+ $ testMethodValueObject ,
209
213
...$ methodsCalled ,
210
214
);
211
215
0 commit comments