@@ -178,6 +178,10 @@ public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time
178
178
*/
179
179
public function startTestSuite (PHPUnit_Framework_TestSuite $ suite )
180
180
{
181
+ if ($ suite instanceof \PHPUnit_Framework_TestSuite_DataProvider) {
182
+ return ;
183
+ }
184
+
181
185
$ suiteName = $ suite ->getName ();
182
186
$ event = new TestSuiteStartedEvent ($ suiteName );
183
187
$ this ->uuid = $ event ->getUuid ();
@@ -201,6 +205,10 @@ public function startTestSuite(PHPUnit_Framework_TestSuite $suite)
201
205
*/
202
206
public function endTestSuite (PHPUnit_Framework_TestSuite $ suite )
203
207
{
208
+ if ($ suite instanceof \PHPUnit_Framework_TestSuite_DataProvider) {
209
+ return ;
210
+ }
211
+
204
212
Allure::lifecycle ()->fire (new TestSuiteFinishedEvent ($ this ->uuid ));
205
213
}
206
214
@@ -212,14 +220,13 @@ public function endTestSuite(PHPUnit_Framework_TestSuite $suite)
212
220
public function startTest (PHPUnit_Framework_Test $ test )
213
221
{
214
222
if ($ test instanceof \PHPUnit_Framework_TestCase) {
215
- $ suiteName = $ this ->suiteName ;
216
223
$ testName = $ test ->getName ();
217
224
$ methodName = $ this ->methodName = $ test ->getName (false );
218
225
219
226
$ event = new TestCaseStartedEvent ($ this ->uuid , $ testName );
220
- if (class_exists ( $ suiteName , false ) && method_exists ($ suiteName , $ methodName )) {
227
+ if (method_exists ($ test , $ methodName )) {
221
228
$ annotationManager = new Annotation \AnnotationManager (
222
- Annotation \AnnotationProvider::getMethodAnnotations ($ suiteName , $ methodName )
229
+ Annotation \AnnotationProvider::getMethodAnnotations (get_class ( $ test ) , $ methodName )
223
230
);
224
231
$ annotationManager ->updateTestCaseEvent ($ event );
225
232
}
0 commit comments